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.
Arrays & Hashing
Use arrays, hash maps, and sets for fast lookup, counting, grouping, and deduplication.
Explore patternsTwo Pointers
Coordinate two indices to shrink the search space in arrays, strings, and partitions.
Explore patternsSliding Window
Maintain a moving range to solve contiguous subarray and substring problems efficiently.
Explore patternsIntervals
Reason about overlap, containment, gaps, scheduling, and interval boundaries.
Explore patternsMerge Intervals
Sort and combine overlapping intervals into the smallest set of disjoint ranges.
Explore patternsIn-Place Linked List Manipulation
Reverse, splice, partition, rotate, and delete linked-list nodes safely in place.
Explore patternsK-Way Merge
Merge multiple sorted sources by tracking the next candidate from each one.
Explore patternsModified Binary Search
Use binary search for ordered lookup, boundaries, rotated arrays, peaks, and monotonic partitions.
Explore patternsBinary Search on the Answer
Binary-search a numeric answer space when feasibility changes monotonically.
Explore patternsSubsets & Combinatorial Generation
Generate subsets and related combinatorial families with clean include-or-exclude reasoning.
Explore patternsGreedy Techniques
Make provably safe local choices that lead to a globally optimal result.
Explore patternsBacktracking
Explore constrained choices recursively, prune invalid paths, and undo state cleanly.
Explore patternsOne-Dimensional Dynamic Programming
Solve problems with one-dimensional DP states, recurrences, base cases, and memory compression.
Explore patternsTwo-Dimensional Dynamic Programming
Model DP problems that naturally require two coordinates or progress dimensions.
Explore patternsCyclic Sort & Index Placement
Place values at natural indices to expose missing, duplicate, or displaced values.
Explore patternsMatrices & Grid Transformations
Manipulate 2D grids with rotations, traversals, markings, layers, and in-place transformations.
Explore patternsStacks
Use LIFO state for nesting, parsing, simulation, path simplification, and deferred work.
Explore patternsMonotonic Stacks & Queues
Maintain monotonic candidates for next-greater, histogram, and sliding-window problems.
Explore patternsTree Depth-First Search
Use DFS to propagate subtree results, path state, and structural information through trees.
Explore patternsState Tracking & Invariants
Track the smallest evolving state needed to preserve a scan or simulation invariant.
Explore patternsBitwise Manipulation
Use XOR, masks, shifts, and binary representation as the core problem-solving model.
Explore patternsDivide & Conquer
Split a problem into independent subproblems and combine their results recursively.
Explore patterns