Data structures & algorithms
Working the NeetCode 250 across 18 patterns. Pick a pattern to drill.
Arrays & Hashing
0Two-sum and friends — the hashing-as-O(1)-lookup pattern, plus prefix sums and grouping.
Two Pointers
0Linear scans that share a slice from both ends, or chase each other through the array.
Sliding Window
0Variable- and fixed-size windows over a sequence — maximum subarray, longest substring, and friends.
Stack
0Matching, nesting, monotonic stacks. The data structure behind almost every parsing problem.
Binary Search
0Search a sorted thing — then realize how often you can sort the search space yourself.
Linked List
0Fast/slow pointers, in-place reversal, dummy nodes. The interview's favourite pointer drill.
Trees
0Traversals, recursion shape, height/depth invariants. BST as the well-behaved special case.
Tries
0Prefix trees — word search, autocomplete, dictionary problems.
Heap / Priority Queue
0Top-K, k-way merge, the lazy way to keep the largest/smallest seen so far.
Backtracking
0DFS through a choice tree, undoing the choice on the way back up. Permutations, combinations, partitions.
Graphs
0BFS, DFS, connected components, topological sort. Adjacency-list everything.
Advanced Graphs
0Dijkstra, Bellman-Ford, Floyd-Warshall, MST. Where graphs meet weighted edges and shortest paths.
1-D Dynamic Programming
0Subproblems indexed by one number — climbing stairs, house robber, longest increasing subseq.
2-D Dynamic Programming
0Subproblems indexed by two numbers — grid paths, edit distance, knapsack variants.
Greedy
0Take the locally best move; prove it lines up with the global optimum. Easy to write, hard to justify.
Intervals
0Sort by start, sweep, merge. The pattern behind meeting rooms, calendar conflicts, and skylines.
Math & Geometry
0Rotations, spirals, modular arithmetic, GCD/LCM — the grab-bag of problems that aren't really patterns.
Bit Manipulation
0XOR tricks, set/clear/test, counting bits. Most often used inside other patterns.