progress

~/problems

Problems

Basics first, then the classics, then company-style assessments. Every problem has tests you run right here; multi-level ones unlock as you go. See the roadmap.

Study plans

650 problems · advanced & competitive are listed separately

Interview roadmap

Arrays & hashing Counting, lookups, sorting with keys, prefix sums.

Complexity analysis guide

1 more Complexity analysis problem →

Hash maps and counting guide

22 more Hash maps and counting problems →

Sorting, custom keys, coordinate compression guide

5 more Sorting, custom keys, coordinate compression problems →

Prefix sums and difference arrays guide

9 more Prefix sums and difference arrays problems →

Two pointers Scan from both ends, or fast and slow.

14 more Two pointers problems →

Stacks Matching brackets, paths, next greater element.

Stacks guide

7 more Stacks problems →

Monotonic stack guide

6 more Monotonic stack problems →

Stack: path parsing guide

5 more Stack: path parsing problems →

Math & matrices Digit arithmetic, rotating and marking grids in place.

7 more Math and matrices problems →

Sliding window Grow and shrink a window over a string or array.

14 more Sliding window problems →

Linked lists Reverse, merge, detect cycles, build an LRU cache.

Linked lists guide

13 more Linked lists problems →

LRU / LFU cache guide

3 more LRU / LFU cache problems →

Trees Traversals, BSTs, and answers built bottom-up.

Binary trees guide

28 more Binary trees problems →

Tree DP guide

7 more Tree DP problems →

Tries Prefix trees for words and autocomplete.

7 more Trie problems →

Heaps Top-k, merging streams, scheduling by time.

Heaps and priority queues guide

16 more Heaps and priority queues problems →

Heap scheduling (deadlines, leases) guide

5 more Heap scheduling (deadlines, leases) problems →

Backtracking Recursion that tries, undoes and tries again.

19 more Recursion and backtracking problems →

Intervals Merge, insert and sweep over ranges.

12 more Intervals / sweep line problems →

Greedy Sort, then take the locally best choice.

16 more Greedy with sorting problems →

Graphs Grids and networks: BFS, DFS, cycles, ordering.

BFS / multi-source BFS guide

13 more BFS / multi-source BFS problems →

DFS and connected components guide

15 more DFS and connected components problems →

Cycle detection guide

1 more Cycle detection problem →

Bipartite graphs / 2-colouring guide

1 more Bipartite graphs / 2-colouring problem →

Topological sort (Kahn's) guide

8 more Topological sort (Kahn's) problems →

1-D dynamic programming One index of state: stairs, robbers, subsequences.

Intro DP guide

17 more Intro DP problems →

Longest increasing subsequence guide

4 more Longest increasing subsequence problems →

Weighted graphs Dijkstra, union-find, spanning trees.

Dijkstra (weighted shortest paths) guide

5 more Dijkstra (weighted shortest paths) problems →

Union-Find guide

10 more Union-Find problems →

Minimum spanning tree guide

1 more Minimum spanning tree problem →

2-D dynamic programming Grids, two strings, knapsacks, ranges.

Grid DP guide

8 more Grid DP problems →

String DP (edit distance, LCS) guide

6 more String DP (edit distance, LCS) problems →

Knapsack and coin change guide

8 more Knapsack and coin change problems →

Interval (range) DP guide

3 more Interval (range) DP problems →

Bit manipulation Masks, shifts and IP-address arithmetic.

12 more Bit manipulation (IP / CIDR) problems →

Practical systems

Simulation & OOP design Model the rules precisely, keep it extensible.

Simulation guide

17 more Simulation problems →

Object-oriented design and extensible simulations guide

28 more Object-oriented design and extensible simulations problems →

Stateful stores Key-value stores, file systems, banks, with history.

Time-travel key-value store guide

1 more Time-travel key-value store problem →

In-memory file system guide

2 more In-memory file system problems →

In-memory database guide

2 more In-memory database problems →

Bank system guide

1 more Bank system problem →

Iterators & parsers Lazy sequences, tokenizers and tiny interpreters.

Iterators and generators guide

7 more Iterators and generators problems →

Parsers and interpreters guide

10 more Parsers and interpreters problems →

Streams & durability Rate counters, serialization, retrying work queues.

Rolling windows and rate counters guide

5 more Rolling windows and rate counters problems →

Serialization and durability guide

2 more Serialization and durability problems →

Fault-tolerant work queue guide

1 more Fault-tolerant work queue problem →

Files & networks Deduplicating files, resolving names.

File deduplication guide

DNS resolver guide

AI infrastructure Batchers, streaming parsers, prompt caches, sampling and token limits.

6 more AI infrastructure problems →

Concurrency

Locks Mutexes, lock ordering, readers and writers.

Lock (mutex) guide

3 more Lock (mutex) problems →

Deadlock and lock ordering guide

2 more Deadlock and lock ordering problems →

Reader-writer and modal locks guide

Coordination Semaphores, conditions and barriers.

Semaphore guide

1 more Semaphore problem →

Condition variable guide

4 more Condition variable problems →

Barrier guide

Pools & pipelines Thread pools, crawlers, producer/consumer buffers.

Thread pool / concurrent crawler guide

3 more Thread pool / concurrent crawler problems →

Ring buffers and producer/consumer pipelines guide

3 more Ring buffers and producer/consumer pipelines problems →

Async Many waiting tasks on one thread: limits, timeouts, retries.

esc