Watch the mechanism
46 visualisers. Every step is narrated, the pseudocode line being executed is highlighted, counters update live, and you can edit the input and scrub backwards through the whole run.
Arrays
Contiguous memory, O(1) indexing. The substrate every other structure is built on.
Strings
Arrays of characters with immutability quirks and a whole family of matching algorithms.
Sorting
A preprocessing step that unlocks two pointers, greedy and binary search.
Binary Search
Halve the search space every step. Works on any monotonic predicate, not just sorted arrays.
Two Pointers
Two indices moving under an invariant. Converts nested loops into one pass.
Sliding Window
A contiguous range that grows on the right and shrinks on the left while a condition holds.
Prefix Sum
Precompute cumulative aggregates so any range query becomes constant time.
Linked List
Pointer surgery. Cheap inserts, no random access, and a favourite whiteboard test.
Stacks & Queues
LIFO and FIFO. Monotonic variants crack the whole next-greater family.
Trees
Recursive structure where almost every solution is solve the children, then combine.
Binary Search Tree
Ordering invariant: left is smaller, right is larger. In-order traversal yields sorted output.
Heap / Priority Queue
Partially ordered complete tree that hands you the extreme element instantly.
Graphs
Nodes and edges. Most grid, dependency and network questions are graph questions in disguise.
Dynamic Programming
Overlapping subproblems plus optimal substructure. Write the recursion, then cache it.
Recursion & Backtracking
Build a candidate, recurse, undo. The brute force that all DP is an optimisation of.
Tries
Prefix tree that makes autocomplete, dictionary and XOR maximisation problems linear.
Math & Number Theory
Primes, GCD, modular arithmetic, combinatorics and the overflow traps around them.