Data structures & algorithms

Working the NeetCode 250 across 18 patterns. Pick a pattern to drill.

Arrays & Hashing

0

Two-sum and friends — the hashing-as-O(1)-lookup pattern, plus prefix sums and grouping.

Two Pointers

0

Linear scans that share a slice from both ends, or chase each other through the array.

Sliding Window

0

Variable- and fixed-size windows over a sequence — maximum subarray, longest substring, and friends.

Stack

0

Matching, nesting, monotonic stacks. The data structure behind almost every parsing problem.

Binary Search

0

Search a sorted thing — then realize how often you can sort the search space yourself.

Linked List

0

Fast/slow pointers, in-place reversal, dummy nodes. The interview's favourite pointer drill.

Trees

0

Traversals, recursion shape, height/depth invariants. BST as the well-behaved special case.

Tries

0

Prefix trees — word search, autocomplete, dictionary problems.

Heap / Priority Queue

0

Top-K, k-way merge, the lazy way to keep the largest/smallest seen so far.

Backtracking

0

DFS through a choice tree, undoing the choice on the way back up. Permutations, combinations, partitions.

Graphs

0

BFS, DFS, connected components, topological sort. Adjacency-list everything.

Advanced Graphs

0

Dijkstra, Bellman-Ford, Floyd-Warshall, MST. Where graphs meet weighted edges and shortest paths.

1-D Dynamic Programming

0

Subproblems indexed by one number — climbing stairs, house robber, longest increasing subseq.

2-D Dynamic Programming

0

Subproblems indexed by two numbers — grid paths, edit distance, knapsack variants.

Greedy

0

Take the locally best move; prove it lines up with the global optimum. Easy to write, hard to justify.

Intervals

0

Sort by start, sweep, merge. The pattern behind meeting rooms, calendar conflicts, and skylines.

Math & Geometry

0

Rotations, spirals, modular arithmetic, GCD/LCM — the grab-bag of problems that aren't really patterns.

Bit Manipulation

0

XOR tricks, set/clear/test, counting bits. Most often used inside other patterns.