0

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.

0 of 46 watched

Arrays

Contiguous memory, O(1) indexing. The substrate every other structure is built on.

Learn the topic

Strings

Arrays of characters with immutability quirks and a whole family of matching algorithms.

Learn the topic

Sorting

A preprocessing step that unlocks two pointers, greedy and binary search.

Learn the topic

Binary Search

Halve the search space every step. Works on any monotonic predicate, not just sorted arrays.

Learn the topic

Two Pointers

Two indices moving under an invariant. Converts nested loops into one pass.

Learn the topic

Sliding Window

A contiguous range that grows on the right and shrinks on the left while a condition holds.

Learn the topic

Prefix Sum

Precompute cumulative aggregates so any range query becomes constant time.

Learn the topic

Linked List

Pointer surgery. Cheap inserts, no random access, and a favourite whiteboard test.

Learn the topic

Stacks & Queues

LIFO and FIFO. Monotonic variants crack the whole next-greater family.

Learn the topic

Trees

Recursive structure where almost every solution is solve the children, then combine.

Learn the topic

Binary Search Tree

Ordering invariant: left is smaller, right is larger. In-order traversal yields sorted output.

Learn the topic

Heap / Priority Queue

Partially ordered complete tree that hands you the extreme element instantly.

Learn the topic

Graphs

Nodes and edges. Most grid, dependency and network questions are graph questions in disguise.

Learn the topic

Dynamic Programming

Overlapping subproblems plus optimal substructure. Write the recursion, then cache it.

Learn the topic

Recursion & Backtracking

Build a candidate, recurse, undo. The brute force that all DP is an optimisation of.

Learn the topic

Tries

Prefix tree that makes autocomplete, dictionary and XOR maximisation problems linear.

Learn the topic

Math & Number Theory

Primes, GCD, modular arithmetic, combinatorics and the overflow traps around them.

Learn the topic