Fundamentals
ProgressInteractive Patterns
▶

System Design Patterns

9 patterns
▶

Algorithm Patterns

22 modules · 47 patterns · 497 problems · 87 core
Core problem (do these for interview prep)·Modules in AlgoMaster study order
▶Foundations2 patterns · 12 problems · 3 core
▶Linear Scaniterative6 problems · 2 core

Single pass through input making a per-element decision; no auxiliary data structure

▶Sort + Linear Scaniterative1 problem · 1 core

Sort first, then iterate to find pairs/sequences/answer

▶Arrays4 patterns · 16 problems · 5 core
▶Greedy — Running Max/Min Trackingiterative2 problems · 2 core

Single pass; maintain running min/max and update answer greedily

▶Two Pointers — Same Direction (Slow/Fast)iterative1 problem · 1 core

Slow read pointer + fast write pointer (or different speeds), both moving forward

▶Two Pointers — Mergeiterative1 problem · 1 core

Two pointers across two sorted inputs, advancing whichever is smaller

▶Data Structure Designdesign1 problem · 1 core

Build a class supporting a defined set of operations efficiently

▶Strings9 patterns · 19 problems · 13 core
▶Hash Set — Membership Checkiterative2 problems · 2 core

Build a Set of seen items; check membership in O(1)

▶Two Pointers — Opposite Endsiterative3 problems · 2 core

Two pointers starting at both ends, converging toward the middle

▶Hash Map — Frequency Counteriterative2 problems · 2 core

Build a Map of element → count; query the map

▶Two Pointers — Same Direction (Slow/Fast)iterative2 problems · 2 core

Slow read pointer + fast write pointer (or different speeds), both moving forward

▶DP — Bitmask (Subset State)dp1 problem · 1 core

DP where state is a bitmask representing which items have been used/visited

▶DP — Sequence (LCS-style)dp1 problem · 1 core

dp[i][j] over two strings/arrays; compares chars at i, j

▶Greedy — Running Max/Min Trackingiterative1 problem · 1 core

Single pass; maintain running min/max and update answer greedily

▶Binary Search — Boundary (First True)iterative1 problem · 1 core

Find the first index where a predicate becomes true (or last where it's false)

▶Linear Scaniterative1 problem · 1 core

Single pass through input making a per-element decision; no auxiliary data structure

▶Linked List4 patterns · 20 problems · 7 core
▶Linked List — Dummy + Predecessoriterative2 problems · 2 core

Use dummy head + curr-as-predecessor pattern; check curr.next, mutate or advance

▶Linked List — Two Pointers (Slow/Fast)iterative6 problems · 2 core
▶Two Pointers — Opposite Endsiterative1 problem · 1 core

Two pointers starting at both ends, converging toward the middle

▶Linked List — Reverse In-Placeiterative2 problems · 2 core

Iterate with prev/curr/next; flip pointer each step

▶Queue4 patterns · 11 problems · 7 core
▶Event Simulationiterative4 problems · 2 core

Step through events/time/state transitions in order, updating world state per step

▶Data Structure Designdesign2 problems · 2 core

Build a class supporting a defined set of operations efficiently

▶Linear Scaniterative2 problems · 2 core

Single pass through input making a per-element decision; no auxiliary data structure

▶Sliding Window — Fixed Size kiterative1 problem · 1 core

Window of fixed size k slides across the array; maintain rolling stat

▶Hash Tables5 patterns · 31 problems · 8 core
▶Hash Set — Membership Checkiterative4 problems · 2 core

Build a Set of seen items; check membership in O(1)

▶Hash Map — Frequency Counteriterative14 problems · 2 core
▶Hash Map — Complement Lookupiterative2 problems · 2 core

For each item, look up its complement (target - item) in the map

▶Sort + Linear Scaniterative1 problem · 1 core

Sort first, then iterate to find pairs/sequences/answer

▶Trie — Prefix Tree Searchrecursive1 problem · 1 core

Build a trie of words; query with prefix or backtracking traversal

▶Stack7 patterns · 26 problems · 9 core
▶Stack — Matching/Validationiterative8 problems · 2 core
▶Stack — Monotoniciterative7 problems · 2 core
▶Backtracking — Generate Allrecursive1 problem · 1 core

Recursively build candidates; choose, recurse, undo (push/pop)

▶Greedy — Running Max/Min Trackingiterative1 problem · 1 core

Single pass; maintain running min/max and update answer greedily

▶Sort + Linear Scaniterative1 problem · 1 core

Sort first, then iterate to find pairs/sequences/answer

▶Binary Search — On Answer Spaceiterative1 problem · 1 core

Binary search over the answer values themselves; check feasibility at mid

▶Sweep Lineiterative1 problem · 1 core

Sort events by position; sweep across maintaining an active set

▶Sorting3 patterns · 22 problems · 6 core
▶Sort — Implementations (Pedagogical)iterative7 problems · 2 core
▶Sort — Custom Comparatoriterative9 problems · 2 core
▶Sort + Linear Scaniterative5 problems · 2 core
▶Algorithm Intros15 patterns · 22 problems · 17 core
▶Divide and Conquerrecursive1 problem · 1 core

Split into smaller subproblems, solve recursively, combine results

▶Hash Map — Complement Lookupiterative1 problem · 1 core

For each item, look up its complement (target - item) in the map

▶Intervals — Sort + Mergeiterative1 problem · 1 core

Sort intervals by start; iterate and merge overlapping

▶DP — 0/1 Knapsackdp1 problem · 1 core

Choose subset of items to maximize value within capacity

▶Sweep Lineiterative1 problem · 1 core

Sort events by position; sweep across maintaining an active set

▶DP — 1Ddp1 problem · 1 core

dp[i] depends on a small fixed number of previous values

▶Stack — Monotoniciterative1 problem · 1 core

Maintain stack in monotonic order; pop while invariant violated

▶Binary Search — Standarditerative1 problem · 1 core

Find an exact value (or report not found) in a sorted array

▶Union Find (DSU)iterative1 problem · 1 core

Disjoint set union with path compression and union by rank

▶Data Structure Designdesign3 problems · 2 core

Build a class supporting a defined set of operations efficiently

▶Event Simulationiterative1 problem · 1 core

Step through events/time/state transitions in order, updating world state per step

▶Sort — Implementations (Pedagogical)iterative1 problem · 1 core

Implement a sorting algorithm from scratch (bubble, insertion, selection, merge, quick)

▶Stack — Matching/Validationiterative1 problem · 1 core

Push openers; pop and check match on closers

▶Topological Sort (Kahn's BFS)iterative1 problem · 1 core

Process nodes in dependency order using indegree + queue

▶Two Pointers — Opposite Endsiterative2 problems · 2 core

Two pointers starting at both ends, converging toward the middle

▶Two Pointers5 patterns · 14 problems · 7 core
▶Linked List — Two Pointers (Slow/Fast)iterative1 problem · 1 core

Slow advances 1 step, fast advances 2 — Floyd's cycle detection style

▶Two Pointers — Mergeiterative1 problem · 1 core

Two pointers across two sorted inputs, advancing whichever is smaller

▶Two Pointers — Same Direction (Slow/Fast)iterative3 problems · 2 core

Slow read pointer + fast write pointer (or different speeds), both moving forward

▶Two Pointers — Opposite Endsiterative7 problems · 2 core
▶Hash Map — Complement Lookupiterative1 problem · 1 core

For each item, look up its complement (target - item) in the map

▶Sliding Window9 patterns · 26 problems · 12 core
▶Sliding Window — Variable Sizeiterative10 problems · 2 core
▶Sliding Window — Fixed Size kiterative7 problems · 2 core
▶Hash Map — Frequency Counteriterative2 problems · 2 core

Build a Map of element → count; query the map

▶Hash Set — Membership Checkiterative1 problem · 1 core

Build a Set of seen items; check membership in O(1)

▶Two Pointers — Same Direction (Slow/Fast)iterative1 problem · 1 core

Slow read pointer + fast write pointer (or different speeds), both moving forward

▶Backtracking — Generate Allrecursive1 problem · 1 core

Recursively build candidates; choose, recurse, undo (push/pop)

▶Trie — Prefix Tree Searchrecursive1 problem · 1 core

Build a trie of words; query with prefix or backtracking traversal

▶Hash Map — Complement Lookupiterative1 problem · 1 core

For each item, look up its complement (target - item) in the map

▶Sort + Linear Scaniterative1 problem · 1 core

Sort first, then iterate to find pairs/sequences/answer

▶Binary Search5 patterns · 16 problems · 8 core
▶Hash Map — Frequency Counteriterative1 problem · 1 core

Build a Map of element → count; query the map

▶Sort + Linear Scaniterative1 problem · 1 core

Sort first, then iterate to find pairs/sequences/answer

▶Binary Search — Boundary (First True)iterative5 problems · 2 core
▶Binary Search — Standarditerative4 problems · 2 core
▶Binary Search — On Answer Spaceiterative5 problems · 2 core
▶Heap7 patterns · 18 problems · 10 core
▶Greedy + Heapiterative6 problems · 2 core
▶Hash Map — Frequency Counteriterative2 problems · 2 core

Build a Map of element → count; query the map

▶Heap — Top Kiterative5 problems · 2 core
▶Sliding Window — Fixed Size kiterative1 problem · 1 core

Window of fixed size k slides across the array; maintain rolling stat

▶Sort + Linear Scaniterative1 problem · 1 core

Sort first, then iterate to find pairs/sequences/answer

▶Sort — Custom Comparatoriterative1 problem · 1 core

Use built-in sort with a custom comparison function

▶DP — 0/1 Knapsackdp1 problem · 1 core

Choose subset of items to maximize value within capacity

▶Intervals3 patterns · 8 problems · 4 core
▶Intervals — Sort + Mergeiterative6 problems · 2 core
▶Greedy — Sort + Linear Scaniterative1 problem · 1 core

Sort first; iterate making the locally optimal choice each step

▶Linear Scaniterative1 problem · 1 core

Single pass through input making a per-element decision; no auxiliary data structure

▶Backtracking5 patterns · 20 problems · 6 core
▶Backtracking — Generate Allrecursive16 problems · 2 core
▶DP — Sequence (LCS-style)dp1 problem · 1 core

dp[i][j] over two strings/arrays; compares chars at i, j

▶Greedy — Running Max/Min Trackingiterative1 problem · 1 core

Single pass; maintain running min/max and update answer greedily

▶DP — 1Ddp1 problem · 1 core

dp[i] depends on a small fixed number of previous values

▶Trie — Prefix Tree Searchrecursive1 problem · 1 core

Build a trie of words; query with prefix or backtracking traversal

▶Math/Bit7 patterns · 15 problems · 9 core
▶DP — 1Ddp1 problem · 1 core

dp[i] depends on a small fixed number of previous values

▶Backtracking — Generate Allrecursive1 problem · 1 core

Recursively build candidates; choose, recurse, undo (push/pop)

▶Event Simulationiterative1 problem · 1 core

Step through events/time/state transitions in order, updating world state per step

▶Linear Scaniterative2 problems · 2 core

Single pass through input making a per-element decision; no auxiliary data structure

▶Sort + Linear Scaniterative2 problems · 2 core

Sort first, then iterate to find pairs/sequences/answer

▶Binary Search — On Answer Spaceiterative1 problem · 1 core

Binary search over the answer values themselves; check feasibility at mid

▶Two Pointers — Opposite Endsiterative1 problem · 1 core

Two pointers starting at both ends, converging toward the middle

▶Greedy9 patterns · 20 problems · 12 core
▶Greedy — Sort + Linear Scaniterative5 problems · 2 core
▶Greedy — Running Max/Min Trackingiterative7 problems · 2 core
▶Sliding Window — Fixed Size kiterative1 problem · 1 core

Window of fixed size k slides across the array; maintain rolling stat

▶Linear Scaniterative2 problems · 2 core

Single pass through input making a per-element decision; no auxiliary data structure

▶Tree — DFS (Recursive)recursive1 problem · 1 core

Recursive function processes a node, then recurses on left and right

▶Two Pointers — Opposite Endsiterative1 problem · 1 core

Two pointers starting at both ends, converging toward the middle

▶Greedy + Heapiterative1 problem · 1 core

Use heap to always pick the optimal element greedily

▶Hash Map — Frequency Counteriterative1 problem · 1 core

Build a Map of element → count; query the map

▶DP — State Machine (Decision)dp1 problem · 1 core

Track multiple dp states (e.g., holding/not-holding stock); transition between states each step

▶Trees4 patterns · 29 problems · 6 core
▶Graph17 patterns · 67 problems · 28 core
▶Topological Sort (Kahn's BFS)iterative6 problems · 2 core
▶Stack — Matching/Validationiterative1 problem · 1 core

Push openers; pop and check match on closers

▶Sort + Linear Scaniterative1 problem · 1 core

Sort first, then iterate to find pairs/sequences/answer

▶Two Pointers — Opposite Endsiterative1 problem · 1 core

Two pointers starting at both ends, converging toward the middle

▶Tree — BFS (Level Order)iterative1 problem · 1 core

Process tree level by level using a queue

▶Tarjan — Bridges / Articulation Pointsrecursive2 problems · 2 core

DFS with discovery/low-link tracking to find critical edges/vertices

▶Tree — DFS (Recursive)recursive4 problems · 2 core

Recursive function processes a node, then recurses on left and right

▶Dijkstra — Weighted Shortest Pathiterative3 problems · 2 core

Min-heap based shortest path on weighted graphs (non-negative weights)

▶Union Find (DSU)iterative10 problems · 2 core
▶Graph — BFS/DFS on Adjacency Listiterative10 problems · 2 core
▶Graph — Grid DFSrecursive8 problems · 2 core
▶Hash Map — Frequency Counteriterative1 problem · 1 core

Build a Map of element → count; query the map

▶DP — 2D Griddp2 problems · 2 core

dp[i][j] depends on dp[i-1][j], dp[i][j-1] (or similar neighbors)

▶DP — Bitmask (Subset State)dp1 problem · 1 core

DP where state is a bitmask representing which items have been used/visited

▶Graph — Grid BFS (Shortest Path)iterative8 problems · 2 core
▶Binary Search — On Answer Spaceiterative2 problems · 2 core

Binary search over the answer values themselves; check feasibility at mid

▶Trie — Prefix Tree Searchrecursive2 problems · 2 core

Build a trie of words; query with prefix or backtracking traversal

▶DP16 patterns · 72 problems · 25 core
▶DP — 0/1 Knapsackdp11 problems · 2 core
▶DP — Intervaldp4 problems · 2 core

dp[i][j] over interval (i,j); inner loop over split point k

▶Divide and Conquerrecursive1 problem · 1 core

Split into smaller subproblems, solve recursively, combine results

▶DP — 1Ddp23 problems · 2 core
▶DP — 2D Griddp11 problems · 2 core
▶DP — Sequence (LCS-style)dp5 problems · 2 core
▶Two Pointers — Mergeiterative1 problem · 1 core

Two pointers across two sorted inputs, advancing whichever is smaller

▶Graph — Grid BFS (Shortest Path)iterative2 problems · 2 core

BFS on a 2D grid using a queue, tracking distance

▶Greedy + Heapiterative1 problem · 1 core

Use heap to always pick the optimal element greedily

▶Greedy — Running Max/Min Trackingiterative4 problems · 2 core
▶Two Pointers — Opposite Endsiterative2 problems · 2 core

Two pointers starting at both ends, converging toward the middle

▶Backtracking — Generate Allrecursive1 problem · 1 core

Recursively build candidates; choose, recurse, undo (push/pop)

▶Binary Search — Boundary (First True)iterative1 problem · 1 core

Find the first index where a predicate becomes true (or last where it's false)

▶Binary Search — On Answer Spaceiterative2 problems · 2 core

Binary search over the answer values themselves; check feasibility at mid

▶Two Pointers — Same Direction (Slow/Fast)iterative1 problem · 1 core

Slow read pointer + fast write pointer (or different speeds), both moving forward

▶DP — State Machine (Decision)dp1 problem · 1 core

Track multiple dp states (e.g., holding/not-holding stock); transition between states each step

▶OOP/Design2 patterns · 9 problems · 4 core
▶Data Structure Designdesign3 problems · 2 core

Build a class supporting a defined set of operations efficiently

▶Event Simulationiterative5 problems · 2 core

Step through events/time/state transitions in order, updating world state per step

▶(uncategorized)4 problems · 0 core