Foundations

Blind & NeetCode patterns, broken into moves you can recognize.

Same pattern names you see in curated lists. Each family has sub-moves with checklists and traps, then jump into Play to practice.

21 patterns · 43 techniques

4 techniques

Arrays & Hashing

Trade O(N) space for instantaneous O(1) hash lookup table operations

Open family
3 techniques

Prefix Sum & Difference

Precalculate cumulative sums to solve contiguous range query problems in O(1)

Open family
3 techniques

Two Pointers

Iterate from opposite ends or converging indices to search sorted elements in O(N)

Open family
2 techniques

Sliding Window

Maintain a contiguous window boundary across arrays to reduce O(N²) to O(N)

Open family
3 techniques

Stack & Monotonic Stack

Last-In First-Out structure for nested parsing and monotonic range tracking

Open family
3 techniques

Binary Search

Logarithmic search space halving down to O(log N) efficiency

Open family
2 techniques

Linked List

Node-based pointer manipulation for linear memory traversal and O(1) mutations

Open family
2 techniques

Fast & Slow Pointers

Floyd's Cycle Finding algorithm using dual pointers moving at different speeds

Open family
2 techniques

Trees & Tree DFS/BFS

Hierarchical node traversal via recursion DFS or level-order queue BFS

Open family
2 techniques

Binary Search Tree

Ordered tree structure with left < node < right property

Open family
2 techniques

Graph BFS / DFS

Grid and adjacency graph exploration using queue BFS or stack DFS

Open family
1 techniques

Topological Sort

Linear ordering of DAG nodes respecting directed dependency constraints

Open family
1 techniques

Union Find (Disjoint Set)

Near O(1) connected component grouping via Path Compression and Union by Rank

Open family
2 techniques

Heap / Priority Queue

O(1) access to min/max key with O(log N) insertion and extraction

Open family
2 techniques

Backtracking

Systematic state space search via depth-first decision trees with pruning

Open family
1 techniques

Trie (Prefix Tree)

Tree structure optimized for string prefix lookup in O(L) time

Open family
1 techniques

1D Dynamic Programming

Solve subproblems using 1D tabulation or memoization arrays

Open family
1 techniques

2D Dynamic Programming

Multi-dimensional grid tabulation for sequence alignment and grid paths

Open family
2 techniques

Greedy Algorithms

Make locally optimal choices at each step to reach a global optimum

Open family
2 techniques

Intervals & Overlaps

Sort range tuples [start, end] to merge overlapping time blocks

Open family
2 techniques

Bit Manipulation

Exploit binary AND, OR, XOR, and bit shifts for O(1) space tricks

Open family