DSA Crash Course
Templates

Template: Template index — find the right template fast:

Mark when done:

Template index — find the right template fast:

#
#   #   Pattern                            Used in module                                   First taught
#   1   Two Pointers (opposite)            phase-2-paradigms/02-two-pointers                Day 15
#   2   Two Pointers (fast/slow)           phase-1-foundation/05-linked-lists               Day 7
#   3   Sliding Window (variable)          phase-2-paradigms/03-sliding-window              Day 16
#   4   Sliding Window (fixed)             phase-2-paradigms/03-sliding-window              Day 16
#   5   BFS (graph)                        phase-2-paradigms/04-bfs-dfs                     Day 17
#   6   BFS (grid, multi-source)           phase-2-paradigms/04-bfs-dfs                     Day 17
#   7   DFS (graph)                        phase-2-paradigms/04-bfs-dfs                     Day 17
#   8   DFS (grid)                         phase-2-paradigms/04-bfs-dfs                     Day 17
#   9   Backtracking (subsets)             phase-2-paradigms/05-backtracking                Day 19
#  10   1D DP                              phase-2-paradigms/07-dynamic-programming         Day 21
#  11   2D DP (strings)                    phase-2-paradigms/07-dynamic-programming         Day 22
#  12   Binary Search (classic)            phase-2-paradigms/01-sorting-searching           Day 13
#  13   Binary Search (on answer)          phase-2-paradigms/01-sorting-searching           Day 14
#  14   Heap (top-K / streaming median)    phase-1-foundation/08-heaps                      Day 11
#  15   Trie                               phase-4-advanced-ds/01-tries                     Day 39
#  16   Union-Find                         phase-4-advanced-ds/02-union-find                Day 40
#  17   Topological Sort (Kahn's BFS)      phase-2-paradigms/04-bfs-dfs / phase-4 advanced  Day 17 / Day 45
#  18   Monotonic Stack                    phase-1-foundation/06-stacks-queues              Day 8
#  19   Prefix Sum                         phase-1-foundation/02-prefix-sum                 Day 5
#  20   Merge Intervals                    phase-2-paradigms/06-greedy                      Day 20
#  21   Build Graph (edges -> adj list)    every graph problem ever                         Day 12
# =============================================================================



# =============================================================================