Algorithms & Data Structures

See the pattern before you solve it.

Core interview patterns, each anchored to a mnemonic and a worked TypeScript solution. Study the signal, then recall the shape until naming the pattern is instant.

32 patterns ยท 8 categories

Scanning & Windows

Sweep the array with moving pointers.6 patterns

Stacks, Queues & Heaps

Order and priority over a stream.5 patterns

Trees & Recursion

Branch, recurse, and combine.5 patterns

Graphs & Networks

Nodes, edges, and the paths between.7 patterns

Dynamic Programming

Remember solved subproblems.3 patterns

Hashing & Sets

Constant-time lookup, counts, and membership.2 patterns

Sorting & Selection

Order first, then exploit the order.2 patterns

Strings & Tries

Prefixes, characters, and word paths.2 patterns