Algorithms are a skill, not trivia -- and skills decay without reps. Pick a topic below, read the warm-up, work through the easy problems with their full solutions explained like textbook examples, then use the links at the bottom to go test yourself on the harder stuff.

Arrays & Hashing

The bar everyone starts on. Most array problems come down to trading time for space: a hash map turns an O(n) search int…

2 easy reps · 4 to level up on

Two Pointers

Instead of nesting loops over an array, walk two indices toward (or away from) each other, using the sortedness or struc…

2 easy reps · 3 to level up on

Sliding Window

A specialization of two pointers for 'best contiguous subarray/substring' problems. Grow a window from the right, shrink…

2 easy reps · 3 to level up on

Stacks

Whenever a problem cares about 'the most recent unmatched thing,' reach for a stack: matching brackets, undo history, ne…

2 easy reps · 3 to level up on

Binary Search

Any time the search space is monotonic -- sorted array, or 'if X works then everything bigger/smaller also works' -- you…

2 easy reps · 3 to level up on

Linked Lists

No random access, so the tools are different: dummy head nodes to avoid edge cases, fast/slow pointers to find midpoints…

2 easy reps · 3 to level up on

Trees

Recursion's home turf. Most tree problems are a DFS or BFS with a small twist, and the recursive solution is usually sho…

2 easy reps · 3 to level up on

Heaps / Priority Queues

For 'give me the smallest/largest so far, repeatedly' problems, a heap keeps the current best at the top in O(log n) per…

2 easy reps · 3 to level up on

Dynamic Programming

Leg day. The hardest topic for most people because the skill isn't the code, it's spotting the recurrence: how does the …

2 easy reps · 4 to level up on

Graphs

Trees generalized: nodes can have multiple parents, cycles are possible, and the graph might not even be connected. The …

2 easy reps · 4 to level up on