~/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.

Algos 75

The essentials: one pass through every interview topic, the problems that come up again and again.

0 of 75 solved

75 problems

Interview roadmap

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

Hash maps and counting guide

Prefix sums and difference arrays guide

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

Stacks Matching brackets, paths, next greater element.

Stacks guide

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

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

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

Linked lists guide

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

Binary trees guide

Tree DP guide

Tries Prefix trees for words and autocomplete.

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

Heaps and priority queues guide

Backtracking Recursion that tries, undoes and tries again.

Intervals Merge, insert and sweep over ranges.

Greedy Sort, then take the locally best choice.

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

DFS and connected components guide

Topological sort (Kahn's) guide

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

Intro DP guide

Longest increasing subsequence guide

Weighted graphs Dijkstra, union-find, spanning trees.

Union-Find guide

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

Grid DP guide

String DP (edit distance, LCS) guide

Knapsack and coin change guide

Bit manipulation Masks, shifts and IP-address arithmetic.

Practical systems

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

Simulation

esc