Skip to content
Problem patterns

Browse coding interview patterns

Choose a solution pattern and practice recognizing the structural signals that point toward it before reading the final algorithm.

Topics

Available topics

Choose a solution pattern and practice recognizing the structural signals that point toward it before reading the final algorithm.

foundation
3 articles

Arrays & Hashing

Use arrays, hash maps, and sets for fast lookup, counting, grouping, and deduplication.

Explore patterns
core-pattern
10 articles

Two Pointers

Coordinate two indices to shrink the search space in arrays, strings, and partitions.

Explore patterns
core-pattern
3 articles

Sliding Window

Maintain a moving range to solve contiguous subarray and substring problems efficiently.

Explore patterns
core-pattern
1 article

Intervals

Reason about overlap, containment, gaps, scheduling, and interval boundaries.

Explore patterns
core-pattern
1 article

Merge Intervals

Sort and combine overlapping intervals into the smallest set of disjoint ranges.

Explore patterns
core-pattern
9 articles

In-Place Linked List Manipulation

Reverse, splice, partition, rotate, and delete linked-list nodes safely in place.

Explore patterns
intermediate
1 article

K-Way Merge

Merge multiple sorted sources by tracking the next candidate from each one.

Explore patterns
core-pattern
6 articles

Modified Binary Search

Use binary search for ordered lookup, boundaries, rotated arrays, peaks, and monotonic partitions.

Explore patterns
intermediate
1 article

Binary Search on the Answer

Binary-search a numeric answer space when feasibility changes monotonically.

Explore patterns
core-pattern
1 article

Subsets & Combinatorial Generation

Generate subsets and related combinatorial families with clean include-or-exclude reasoning.

Explore patterns
intermediate
3 articles

Greedy Techniques

Make provably safe local choices that lead to a globally optimal result.

Explore patterns
intermediate
13 articles

Backtracking

Explore constrained choices recursively, prune invalid paths, and undo state cleanly.

Explore patterns
intermediate
5 articles

One-Dimensional Dynamic Programming

Solve problems with one-dimensional DP states, recurrences, base cases, and memory compression.

Explore patterns
advanced
9 articles

Two-Dimensional Dynamic Programming

Model DP problems that naturally require two coordinates or progress dimensions.

Explore patterns
core-pattern
1 article

Cyclic Sort & Index Placement

Place values at natural indices to expose missing, duplicate, or displaced values.

Explore patterns
core-pattern
4 articles

Matrices & Grid Transformations

Manipulate 2D grids with rotations, traversals, markings, layers, and in-place transformations.

Explore patterns
core-pattern
2 articles

Stacks

Use LIFO state for nesting, parsing, simulation, path simplification, and deferred work.

Explore patterns
intermediate
2 articles

Monotonic Stacks & Queues

Maintain monotonic candidates for next-greater, histogram, and sliding-window problems.

Explore patterns
core-pattern
4 articles

Tree Depth-First Search

Use DFS to propagate subtree results, path state, and structural information through trees.

Explore patterns
core-pattern
18 articles

State Tracking & Invariants

Track the smallest evolving state needed to preserve a scan or simulation invariant.

Explore patterns
intermediate
2 articles

Bitwise Manipulation

Use XOR, masks, shifts, and binary representation as the core problem-solving model.

Explore patterns
advanced
1 article

Divide & Conquer

Split a problem into independent subproblems and combine their results recursively.

Explore patterns