DSA Bootcamp — JavaScript Edition

12 Weeks.
28 patterns. 198 problems.

Pace 2–3 hrs/day
Language JavaScript
Realistic timeline 15–20 weeks
Interview ready 95% junior/mid
00

Study methodology

Phase 1 — Day 0
Learn
30–60 min per problem
  • Read problem carefully (5 min)
  • Try to solve WITHOUT hints (15–20 min max)
  • If stuck, read ONE approach (5 min)
  • Code the solution yourself (10–15 min)
  • Test with examples (5 min)
  • Mark: ✅ solved alone, ⚠️ needed help
Phase 2 — Next Day
Review
15–30 min per problem
  • Solve WITHOUT looking at code
  • If can't remember, quick peek at notes only
  • Must code from scratch
  • If easy → Mark ✓✓ mastered
  • If struggled → Mark ⚠️ review again
Phase 3 — After 1 Week
Reinforce
10–20 min per problem
  • Solve from scratch, zero hints
  • Should finish in under 15 min
  • If smooth → Mark ✓✓✓ pattern mastered
  • If struggled → Repeat in 3 days
Do
  • Read ONE pattern explanation (15 min max)
  • Copy template to notes, then solve
  • Document each pattern in your own words
  • Solve 1 easy first, then 2–3 mediums
  • Write solutions in plain JavaScript
Don't
  • Watch long explanation videos
  • Take extensive notes instead of coding
  • Read multiple explanations for one pattern
  • Skip the spaced repetition reviews
  • Move on if Phase 1 was ⚠️ on everything
01

Time schedule

Daily split

Morning (university pace)1.5 hrs — new problems
Evening (university pace)0.5–1 hr — review
Morning (summer)4 hrs — new problems
Afternoon (summer)3 hrs — more problems
Evening (summer)1–2 hrs — review

Weekly structure

Days 1–5New patterns + problems
Day 6Review ALL week (Phase 2)
Day 7Mock interview + reflection
End of Week 4/8/12Full month review
ImportantFollow order, not day numbers
02

Weeks 1–2 — Arrays & Two Pointers

31 problems
Week 1 · Days 1–5
Two Pointers (Opposite Direction)
Days 1–2
JS Template
let left = 0, right = arr.length - 1; while (left < right) { if (condition) return result; else if (sum > target) right--; else left++; }
#ProblemDifficultyPhase 1Phase 2Phase 3
1LC-167 Two Sum IIEasyDay 1Day 2Day 8
2LC-125 Valid PalindromeEasyDay 1Day 2Day 8
3LC-26 Remove DuplicatesEasyDay 1Day 2Day 8
4LC-283 Move ZeroesEasyDay 1Day 2Day 8
5LC-977 Squares of Sorted ArrayEasyDay 2Day 3Day 9
6LC-15 3Sum ⭐⭐⭐MediumDay 2Day 3Day 9
7LC-16 3Sum ClosestMediumDay 2Day 3Day 9
8LC-11 Container With Water ⭐⭐MediumDay 2Day 3Day 9
Prefix Sum
Days 3–4
JS Template
const prefix = new Array(n + 1).fill(0); for (let i = 0; i < n; i++) prefix[i+1] = prefix[i] + arr[i]; // Range sum [l, r]: prefix[r+1] - prefix[l]
#ProblemDifficultyPhase 1Phase 2Phase 3
9LC-303 Range Sum QueryEasyDay 3Day 4Day 10
10LC-724 Find Pivot IndexEasyDay 3Day 4Day 10
11LC-238 Product Except Self ⭐⭐⭐MediumDay 3Day 4Day 10
12LC-560 Subarray Sum = K ⭐⭐⭐MediumDay 4Day 5Day 11
13LC-523 Continuous Subarray SumMediumDay 4Day 5Day 11
14LC-974 Subarray Sum Divisible KMediumDay 4Day 5Day 11
Kadane's Algorithm
Day 5
JS Template
let maxSum = arr[0], curr = arr[0]; for (let i = 1; i < arr.length; i++) { curr = Math.max(arr[i], curr + arr[i]); maxSum = Math.max(maxSum, curr); }
#ProblemDifficultyPhase 1Phase 2Phase 3
15LC-53 Maximum Subarray ⭐⭐EasyDay 5Day 6Day 12
16LC-152 Maximum Product SubarrayMediumDay 5Day 6Day 12
17LC-121 Best Time Buy/Sell StockEasyDay 5Day 6Day 12
Review Day — Day 6

Re-solve all 17 problems (Phase 2)

Easy problems: under 15 min. Medium problems: under 25 min. Mark anything you struggled with for extra review.

Mock Interview — Day 7

3 problems in 65 minutes

1 Easy (10 min) + 1 Medium (25 min) + 1 Medium (30 min) — all random from problems 1–17.

Week 2 · Days 8–14
Sliding Window — Fixed Size
Days 8–9
JS Template
let windowSum = arr.slice(0, k).reduce((a, b) => a + b, 0); let maxSum = windowSum; for (let i = k; i < arr.length; i++) { windowSum += arr[i] - arr[i - k]; maxSum = Math.max(maxSum, windowSum); }
#ProblemDifficultyPhase 1Phase 2Phase 3
18LC-643 Max Average SubarrayEasyDay 8Day 9Day 15
19LC-1004 Max Consecutive Ones IIIMediumDay 8Day 9Day 15
20LC-438 Find All Anagrams ⭐⭐MediumDay 9Day 10Day 16
21LC-567 Permutation in StringMediumDay 9Day 10Day 16
22LC-1456 Max Vowels in SubstringMediumDay 9Day 10Day 16
Sliding Window — Variable Size
Days 10–11
JS Template
let left = 0; for (let right = 0; right < arr.length; right++) { // add arr[right] to window while (/* window invalid */) { // remove arr[left] left++; } // update result }
#ProblemDifficultyPhase 1Phase 2Phase 3
23LC-3 Longest Substring No Repeat ⭐⭐⭐MediumDay 10Day 11Day 17
24LC-209 Min Size Subarray Sum ⭐⭐MediumDay 10Day 11Day 17
25LC-340 At Most K Distinct CharsMediumDay 10Day 11Day 17
26LC-904 Fruit Into BasketsMediumDay 11Day 12Day 18
27LC-424 Longest Repeating Char ⭐⭐MediumDay 11Day 12Day 18
28LC-76 Minimum Window Substring ⭐⭐⭐HardDay 11Day 12Day 18
Two Pointers — Hard Problems
Day 12
#ProblemDifficultyPhase 1Phase 2Phase 3
29LC-42 Trapping Rain Water ⭐⭐⭐HardDay 12Day 13Day 19
30LC-18 4SumMediumDay 12Day 13Day 19
31LC-75 Sort Colors (Dutch Flag) ⭐⭐MediumDay 12Day 13Day 19
Review — Day 13

Review all 31 problems (Week 1: Phase 3 / Week 2: Phase 2)

Focus on ⚠️ problems. Create your pattern cheat sheet.

Mock Interview — Day 14

3 problems in 75 minutes + reflection

Which patterns do you know well? Which need more work? Are you hitting time limits?

03

Weeks 3–4 — Hashing, Intervals & Sorting

32 problems
Week 3 · Days 15–21
HashMap — Frequency Counting
Days 15–16
JS Template
const freq = {}; for (const item of arr) freq[item] = (freq[item] || 0) + 1; // Or use Map: const map = new Map(); for (const item of arr) map.set(item, (map.get(item) || 0) + 1);
#ProblemDifficultyPhase 1Phase 2Phase 3
32LC-1 Two Sum ⭐⭐⭐EasyDay 15Day 16Day 22
33LC-217 Contains DuplicateEasyDay 15Day 16Day 22
34LC-242 Valid AnagramEasyDay 15Day 16Day 22
35LC-49 Group Anagrams ⭐⭐MediumDay 15Day 16Day 22
36LC-347 Top K Frequent Elements ⭐⭐MediumDay 16Day 17Day 23
37LC-451 Sort Chars by FrequencyMediumDay 16Day 17Day 23
38LC-128 Longest Consecutive ⭐⭐⭐MediumDay 16Day 17Day 23
Merge Intervals ✨ NEW
Days 17–18
NewImportant
JS Template
intervals.sort((a, b) => a[0] - b[0]); const merged = [intervals[0]]; for (const curr of intervals.slice(1)) { if (curr[0] <= merged[merged.length-1][1]) merged[merged.length-1][1] = Math.max(merged[merged.length-1][1], curr[1]); else merged.push(curr); }
#ProblemDifficultyPhase 1Phase 2Phase 3
39LC-56 Merge Intervals ⭐⭐⭐MediumDay 17Day 18Day 24
40LC-57 Insert Interval ⭐⭐MediumDay 17Day 18Day 24
41LC-252 Meeting RoomsEasyDay 17Day 18Day 24
42LC-253 Meeting Rooms II ⭐⭐⭐MediumDay 18Day 19Day 25
43LC-986 Interval List IntersectionMediumDay 18Day 19Day 25
44LC-435 Non-overlapping Intervals ⭐⭐MediumDay 18Day 19Day 25
45LC-759 Employee Free TimeHardDay 18Day 19Day 25
HashSet Advanced
Day 19
#ProblemDifficultyPhase 1Phase 2Phase 3
46LC-202 Happy NumberEasyDay 19Day 20Day 26
47LC-136 Single Number (XOR)EasyDay 19Day 20Day 26
48LC-349 Intersection of ArraysEasyDay 19Day 20Day 26
Review — Day 20

Review all Week 3 problems (Phase 2)

Mock Interview — Day 21

3 problems in 75 minutes

Week 4 · Days 22–28
Cyclic Sort ✨ NEW
Days 22–23
New
JS Template
let i = 0; while (i < arr.length) { const correctIdx = arr[i] - 1; if (arr[i] !== arr[correctIdx]) { [arr[i], arr[correctIdx]] = [arr[correctIdx], arr[i]]; } else i++; }
#ProblemDifficultyPhase 1Phase 2Phase 3
49LC-268 Missing NumberEasyDay 22Day 23Day 29
50LC-448 Find All Missing NumbersEasyDay 22Day 23Day 29
51LC-287 Find Duplicate Number ⭐⭐MediumDay 22Day 23Day 29
52LC-442 Find All DuplicatesMediumDay 23Day 24Day 30
53LC-645 Set MismatchEasyDay 23Day 24Day 30
54LC-41 First Missing PositiveHardDay 23Day 24Day 30
Bitwise XOR ✨ NEW
Days 24–25
New
JS Template — XOR properties: a ^ a = 0, a ^ 0 = a
let result = 0; for (const num of nums) result ^= num; // result = the unique number
#ProblemDifficultyPhase 1Phase 2Phase 3
55LC-136 Single NumberEasyDay 24Day 25Day 31
56LC-260 Single Number IIIMediumDay 24Day 25Day 31
57LC-476 Number ComplementEasyDay 25Day 26Day 32
58LC-832 Flipping an ImageEasyDay 25Day 26Day 32
Modified Binary Search
Day 26
JS Template
let left = 0, right = arr.length - 1; while (left <= right) { const mid = left + Math.floor((right - left) / 2); if (arr[mid] === target) return mid; else if (arr[mid] < target) left = mid + 1; else right = mid - 1; }
#ProblemDifficultyPhase 1Phase 2Phase 3
59LC-704 Binary SearchEasyDay 26Day 27Day 33
60LC-34 Find First & Last Position ⭐⭐MediumDay 26Day 27Day 33
61LC-33 Search Rotated Array ⭐⭐⭐MediumDay 26Day 27Day 33
62LC-153 Find Min Rotated ArrayMediumDay 26Day 27Day 33
63LC-162 Find Peak ElementMediumDay 26Day 27Day 33
Review — Day 27

Review all Week 3–4 problems

Mock Interview + Month 1 Review — Day 28

4 problems in 90 min + 10 random problems from Weeks 1–4

04

Weeks 5–6 — Linked Lists, Stacks & Heaps

34 problems
Week 5 · Days 29–35
Fast & Slow Pointers (Floyd's Cycle)
Days 29–30
JS Template
let slow = head, fast = head; while (fast && fast.next) { slow = slow.next; fast = fast.next.next; if (slow === fast) break; // cycle detected }
#ProblemDifficultyPhase 1Phase 2Phase 3
64LC-141 Linked List Cycle ⭐⭐⭐EasyDay 29Day 30Day 36
65LC-142 Cycle Start ⭐⭐MediumDay 29Day 30Day 36
66LC-876 Middle of Linked ListEasyDay 29Day 30Day 36
67LC-234 Palindrome Linked List ⭐⭐EasyDay 30Day 31Day 37
68LC-143 Reorder List ⭐⭐MediumDay 30Day 31Day 37
69LC-202 Happy NumberEasyDay 30Day 31Day 37
Linked List Reversal
Days 31–32
JS Template
let prev = null, curr = head; while (curr) { const next = curr.next; curr.next = prev; prev = curr; curr = next; } return prev;
#ProblemDifficultyPhase 1Phase 2Phase 3
70LC-206 Reverse Linked List ⭐⭐⭐EasyDay 31Day 32Day 38
71LC-92 Reverse Between ⭐⭐MediumDay 31Day 32Day 38
72LC-25 Reverse K Group ⭐⭐⭐HardDay 32Day 33Day 39
73LC-61 Rotate ListMediumDay 32Day 33Day 39
74LC-24 Swap Nodes in PairsMediumDay 32Day 33Day 39
Linked List — Misc
Day 33
#ProblemDifficultyPhase 1Phase 2Phase 3
75LC-21 Merge Two Sorted Lists ⭐⭐EasyDay 33Day 34Day 40
76LC-2 Add Two Numbers ⭐⭐MediumDay 33Day 34Day 40
77LC-19 Remove Nth from End ⭐⭐MediumDay 33Day 34Day 40
78LC-138 Copy List Random PointerMediumDay 33Day 34Day 40
Review — Day 34

Review all Week 5 problems

Mock Interview — Day 35

3 linked list problems in 75 minutes

Week 6 · Days 36–43
Stack Basics
Days 36–37
JS Template
const stack = []; stack.push(item); // push const top = stack.pop(); // pop const peek = stack[stack.length - 1]; // top without removing
#ProblemDifficultyPhase 1Phase 2Phase 3
79LC-20 Valid Parentheses ⭐⭐⭐EasyDay 36Day 37Day 43
80LC-155 Min Stack ⭐⭐EasyDay 36Day 37Day 43
81LC-150 Evaluate RPNMediumDay 36Day 37Day 43
82LC-71 Simplify PathMediumDay 37Day 38Day 44
83LC-394 Decode String ⭐⭐MediumDay 37Day 38Day 44
84LC-232 Queue using StacksEasyDay 37Day 38Day 44
Monotonic Stack
Days 38–39
JS Template
const stack = []; // stores indices for (let i = 0; i < arr.length; i++) { while (stack.length && arr[stack[stack.length-1]] < arr[i]) { const idx = stack.pop(); result[idx] = arr[i]; // next greater element } stack.push(i); }
#ProblemDifficultyPhase 1Phase 2Phase 3
85LC-496 Next Greater Element IEasyDay 38Day 39Day 45
86LC-503 Next Greater Element IIMediumDay 38Day 39Day 45
87LC-739 Daily Temperatures ⭐⭐⭐MediumDay 38Day 39Day 45
88LC-84 Largest Rectangle ⭐⭐⭐HardDay 39Day 40Day 46
89LC-85 Maximal RectangleHardDay 39Day 40Day 46
90LC-42 Trapping Rain (Stack) ⭐⭐⭐HardDay 39Day 40Day 46
Two Heaps ✨ NEW — For Median
Day 40
New
JS Concept — Use a heap library or implement MinHeap/MaxHeap
// maxHeap = left half (negate values for max behavior) // minHeap = right half // Invariant: maxHeap.size >= minHeap.size, maxHeap.top <= minHeap.top // Median = maxHeap.top (odd) or avg of both tops (even)
#ProblemDifficultyPhase 1Phase 2Phase 3
91LC-295 Find Median Stream ⭐⭐⭐HardDay 40Day 41Day 47
92LC-480 Sliding Window MedianHardDay 40Day 41Day 47
Heap / Priority Queue
Day 41
JS Note — No built-in heap. Use a MinHeap class or sort-based approach for LeetCode.
// Minimal MinHeap for LeetCode JS: class MinHeap { constructor(comparator = (a,b) => a - b) { this.h = []; this.cmp = comparator; } push(v) { this.h.push(v); this._up(this.h.length-1); } pop() { const top=this.h[0]; this.h[0]=this.h.pop(); this._down(0); return top; } peek() { return this.h[0]; } size() { return this.h.length; } _up(i) { while(i>0){const p=(i-1)>>1;if(this.cmp(this.h[i],this.h[p])>=0)break;[this.h[i],this.h[p]]=[this.h[p],this.h[i]];i=p;} } _down(i) { const n=this.h.length;while(true){let s=i,l=2*i+1,r=2*i+2;if(l<n&&this.cmp(this.h[l],this.h[s])<0)s=l;if(r<n&&this.cmp(this.h[r],this.h[s])<0)s=r;if(s===i)break;[this.h[i],this.h[s]]=[this.h[s],this.h[i]];i=s;} } }
#ProblemDifficultyPhase 1Phase 2Phase 3
93LC-215 Kth Largest Element ⭐⭐⭐MediumDay 41Day 42Day 48
94LC-347 Top K Frequent (heap) ⭐⭐MediumDay 41Day 42Day 48
95LC-23 Merge K Sorted Lists ⭐⭐⭐HardDay 41Day 42Day 48
96LC-373 Find K Pairs Smallest SumsMediumDay 41Day 42Day 48
97LC-378 Kth Smallest in MatrixMediumDay 41Day 42Day 48
Review — Day 42

Review all Week 5–6 problems

Mock Interview + Month 2 Review — Day 43

4 problems + 15 random from Weeks 1–6

05

Weeks 7–8 — Trees & Backtracking

40 problems
Week 7 · Days 44–50
Tree DFS
Days 44–45
JS Template
function dfs(node) { if (!node) return baseCase; const left = dfs(node.left); const right = dfs(node.right); return combine(node.val, left, right); }
#ProblemDifficultyPhase 1Phase 2Phase 3
98LC-104 Max Depth ⭐⭐⭐EasyDay 44Day 45Day 51
99LC-111 Min DepthEasyDay 44Day 45Day 51
100LC-100 Same TreeEasyDay 44Day 45Day 51
101LC-101 Symmetric TreeEasyDay 44Day 45Day 51
102LC-226 Invert Tree ⭐⭐EasyDay 44Day 45Day 51
103LC-112 Path Sum ⭐⭐EasyDay 45Day 46Day 52
104LC-113 Path Sum IIMediumDay 45Day 46Day 52
105LC-257 Binary Tree PathsEasyDay 45Day 46Day 52
106LC-543 Diameter of Tree ⭐⭐⭐EasyDay 45Day 46Day 52
107LC-124 Binary Tree Max Path ⭐⭐⭐HardDay 45Day 46Day 52
Tree BFS (Level Order)
Days 46–47
JS Template
const queue = [root]; while (queue.length) { const levelSize = queue.length; for (let i = 0; i < levelSize; i++) { const node = queue.shift(); if (node.left) queue.push(node.left); if (node.right) queue.push(node.right); } }
#ProblemDifficultyPhase 1Phase 2Phase 3
108LC-102 Level Order ⭐⭐⭐MediumDay 46Day 47Day 53
109LC-107 Level Order BottomMediumDay 46Day 47Day 53
110LC-103 Zigzag Level Order ⭐⭐MediumDay 46Day 47Day 53
111LC-637 Average of LevelsEasyDay 46Day 47Day 53
112LC-199 Right Side View ⭐⭐MediumDay 47Day 48Day 54
113LC-515 Find Largest Value RowMediumDay 47Day 48Day 54
114LC-662 Max Width of TreeMediumDay 47Day 48Day 54
BST — Binary Search Tree
Day 48
JS Template
function validateBST(node, min = -Infinity, max = Infinity) { if (!node) return true; if (node.val <= min || node.val >= max) return false; return validateBST(node.left, min, node.val) && validateBST(node.right, node.val, max); }
#ProblemDifficultyPhase 1Phase 2Phase 3
115LC-98 Validate BST ⭐⭐⭐MediumDay 48Day 49Day 55
116LC-700 Search in BSTEasyDay 48Day 49Day 55
117LC-701 Insert into BSTMediumDay 48Day 49Day 55
118LC-450 Delete Node BSTMediumDay 48Day 49Day 55
119LC-230 Kth Smallest in BST ⭐⭐MediumDay 48Day 49Day 55
120LC-235 LCA in BST ⭐⭐EasyDay 48Day 49Day 55
Review — Day 49

Review Week 7 problems

Mock Interview — Day 50

3 tree problems in 75 minutes

Week 8 · Days 51–57
Backtracking — Subsets & Permutations
Days 51–54
JS Template
function backtrack(path, start) { result.push([...path]); for (let i = start; i < nums.length; i++) { path.push(nums[i]); backtrack(path, i + 1); path.pop(); } }
#ProblemDifficultyPhase 1Phase 2Phase 3
121LC-78 Subsets ⭐⭐⭐MediumDay 51Day 52Day 58
122LC-90 Subsets IIMediumDay 51Day 52Day 58
123LC-46 Permutations ⭐⭐⭐MediumDay 51Day 52Day 58
124LC-47 Permutations IIMediumDay 52Day 53Day 59
125LC-77 CombinationsMediumDay 52Day 53Day 59
126LC-39 Combination Sum ⭐⭐MediumDay 52Day 53Day 59
127LC-40 Combination Sum IIMediumDay 52Day 53Day 59
128LC-22 Generate Parentheses ⭐⭐⭐MediumDay 53Day 54Day 60
129LC-17 Letter Combinations ⭐⭐MediumDay 53Day 54Day 60
130LC-131 Palindrome PartitioningMediumDay 54Day 55Day 61
131LC-79 Word Search ⭐⭐⭐MediumDay 54Day 55Day 61
132LC-51 N-Queens ⭐⭐⭐HardDay 54Day 55Day 61
133LC-37 Sudoku SolverHardDay 54Day 55Day 61
Trie
Day 55
JS Template
class TrieNode { constructor() { this.children = {}; this.isEnd = false; } } class Trie { constructor() { this.root = new TrieNode(); } insert(word) { let node = this.root; for (const ch of word) { if (!node.children[ch]) node.children[ch] = new TrieNode(); node = node.children[ch]; } node.isEnd = true; } }
#ProblemDifficultyPhase 1Phase 2Phase 3
134LC-208 Implement Trie ⭐⭐⭐MediumDay 55Day 56Day 62
135LC-211 Add/Search WordsMediumDay 55Day 56Day 62
136LC-212 Word Search II ⭐⭐⭐HardDay 55Day 56Day 62
137LC-1268 Search SuggestionsMediumDay 55Day 56Day 62
Review — Day 56

Review all Week 7–8 problems

Mock Interview + Month 3 Review — Day 57

4 problems + 20 random from Weeks 1–8

06

Weeks 9–10 — Graphs & Greedy

33 problems
Week 9 · Days 58–64
Graph DFS / BFS
Days 58–59
JS Templates
// DFS const visited = new Set(); function dfs(node) { if (visited.has(node)) return; visited.add(node); for (const neighbor of graph[node]) dfs(neighbor); } // BFS const queue = [start], visited = new Set([start]); while (queue.length) { const node = queue.shift(); for (const neighbor of graph[node]) { if (!visited.has(neighbor)) { visited.add(neighbor); queue.push(neighbor); } } }
#ProblemDifficultyPhase 1Phase 2Phase 3
138LC-200 Number of Islands ⭐⭐⭐MediumDay 58Day 59Day 65
139LC-133 Clone Graph ⭐⭐MediumDay 58Day 59Day 65
140LC-695 Max Area of IslandMediumDay 58Day 59Day 65
141LC-733 Flood FillEasyDay 58Day 59Day 65
142LC-463 Island PerimeterEasyDay 58Day 59Day 65
143LC-130 Surrounded Regions ⭐⭐MediumDay 59Day 60Day 66
144LC-417 Pacific Atlantic ⭐⭐MediumDay 59Day 60Day 66
145LC-994 Rotting Oranges ⭐⭐⭐MediumDay 59Day 60Day 66
Union Find (Disjoint Set)
Days 60–61
JS Template
class UnionFind { constructor(n) { this.parent = Array.from({length:n},(_,i)=>i); this.rank = new Array(n).fill(1); } find(x) { if (this.parent[x]!==x) this.parent[x]=this.find(this.parent[x]); return this.parent[x]; } union(x, y) { const [px, py] = [this.find(x), this.find(y)]; if (px===py) return false; if (this.rank[px] < this.rank[py]) this.parent[px]=py; else if (this.rank[px] > this.rank[py]) this.parent[py]=px; else { this.parent[py]=px; this.rank[px]++; } return true; } }
#ProblemDifficultyPhase 1Phase 2Phase 3
146LC-547 Number of Provinces ⭐⭐MediumDay 60Day 61Day 67
147LC-684 Redundant Connection ⭐⭐MediumDay 60Day 61Day 67
148LC-685 Redundant Connection IIHardDay 60Day 61Day 67
149LC-721 Accounts Merge ⭐⭐MediumDay 61Day 62Day 68
150LC-323 Connected ComponentsMediumDay 61Day 62Day 68
151LC-1584 Min Cost Connect Points ⭐⭐MediumDay 61Day 62Day 68
Topological Sort (Kahn's Algorithm)
Day 62
JS Template
function topoSort(n, edges) { const graph = Array.from({length:n}, ()=>[]); const inDegree = new Array(n).fill(0); for (const [u,v] of edges) { graph[u].push(v); inDegree[v]++; } const queue = []; for (let i=0;i<n;i++) if(inDegree[i]===0) queue.push(i); const result = []; while (queue.length) { const node = queue.shift(); result.push(node); for (const nb of graph[node]) if(--inDegree[nb]===0) queue.push(nb); } return result.length===n ? result : []; }
#ProblemDifficultyPhase 1Phase 2Phase 3
152LC-207 Course Schedule ⭐⭐⭐MediumDay 62Day 63Day 69
153LC-210 Course Schedule II ⭐⭐⭐MediumDay 62Day 63Day 69
154LC-269 Alien Dictionary ⭐⭐⭐HardDay 62Day 63Day 69
155LC-310 Minimum Height TreesMediumDay 62Day 63Day 69
Review — Day 63

Review Week 9 problems

Mock Interview — Day 64

3 graph problems in 75 minutes

Week 10 · Days 65–71
Dijkstra's Algorithm — Shortest Path
Days 65–66
JS Template — use MinHeap from Week 6
function dijkstra(graph, start) { const dist = {}; for (const node in graph) dist[node] = Infinity; dist[start] = 0; const pq = new MinHeap((a,b)=>a[0]-b[0]); pq.push([0, start]); while (pq.size()) { const [d, node] = pq.pop(); if (d > dist[node]) continue; for (const [nb, w] of graph[node]) { if (dist[node]+w < dist[nb]) { dist[nb]=dist[node]+w; pq.push([dist[nb],nb]); } } } return dist; }
#ProblemDifficultyPhase 1Phase 2Phase 3
156LC-743 Network Delay Time ⭐⭐MediumDay 65Day 66Day 72
157LC-787 Cheapest Flights K Stops ⭐⭐MediumDay 65Day 66Day 72
158LC-1091 Shortest Path BinaryMediumDay 65Day 66Day 72
159LC-1514 Path Max ProbabilityMediumDay 66Day 67Day 73
160LC-1631 Path Min Effort ⭐⭐MediumDay 66Day 67Day 73
Greedy Algorithms ✨ NEW
Days 67–68
New
JS Template — Sort then choose greedily
// Common pattern: sort by end time, pick greedily items.sort((a, b) => a[1] - b[1]); for (const item of items) { if (canTake(item)) take(item); }
#ProblemDifficultyPhase 1Phase 2Phase 3
161LC-455 Assign CookiesEasyDay 67Day 68Day 74
162LC-122 Best Time Buy/Sell II ⭐⭐EasyDay 67Day 68Day 74
163LC-55 Jump Game ⭐⭐⭐MediumDay 67Day 68Day 74
164LC-45 Jump Game II ⭐⭐MediumDay 68Day 69Day 75
165LC-134 Gas Station ⭐⭐⭐MediumDay 68Day 69Day 75
166LC-135 CandyHardDay 68Day 69Day 75
167LC-763 Partition Labels ⭐⭐MediumDay 68Day 69Day 75
Advanced Graph
Day 69
#ProblemDifficultyPhase 1Phase 2Phase 3
168LC-127 Word Ladder ⭐⭐⭐HardDay 69Day 70Day 76
169LC-126 Word Ladder IIHardDay 69Day 70Day 76
170LC-1192 Critical Connections ⭐⭐⭐HardDay 69Day 70Day 76
Review — Day 70

Review all Week 9–10 problems

Mock Interview + Month 4 Review — Day 71

5 problems + 25 random from all weeks

07

Weeks 11–12 — Dynamic Programming

28 problems
Week 11 · Days 72–78
1D Dynamic Programming
Days 72–73
JS Template — Bottom-up
const dp = new Array(n + 1).fill(0); dp[0] = baseCase; for (let i = 1; i <= n; i++) { dp[i] = recurrence(dp[i-1], dp[i-2]); // adjust as needed } return dp[n];
#ProblemDifficultyPhase 1Phase 2Phase 3
171LC-70 Climbing Stairs ⭐⭐⭐EasyDay 72Day 73Day 79
172LC-509 Fibonacci NumberEasyDay 72Day 73Day 79
173LC-746 Min Cost Climbing StairsEasyDay 72Day 73Day 79
174LC-198 House Robber ⭐⭐⭐MediumDay 72Day 73Day 79
175LC-213 House Robber II ⭐⭐MediumDay 73Day 74Day 80
176LC-91 Decode Ways ⭐⭐MediumDay 73Day 74Day 80
177LC-322 Coin Change ⭐⭐⭐MediumDay 73Day 74Day 80
178LC-518 Coin Change IIMediumDay 73Day 74Day 80
179LC-300 Longest Increasing Subseq ⭐⭐⭐MediumDay 73Day 74Day 80
2D DP — Grid & Subsequences
Days 74–75
JS Template
const dp = Array.from({length: m+1}, ()=>new Array(n+1).fill(0)); for (let i = 1; i <= m; i++) { for (let j = 1; j <= n; j++) { dp[i][j] = recurrence(dp[i-1][j], dp[i][j-1], dp[i-1][j-1]); } } return dp[m][n];
#ProblemDifficultyPhase 1Phase 2Phase 3
180LC-62 Unique Paths ⭐⭐⭐MediumDay 74Day 75Day 81
181LC-63 Unique Paths IIMediumDay 74Day 75Day 81
182LC-64 Minimum Path Sum ⭐⭐MediumDay 74Day 75Day 81
183LC-1143 Longest Common Subseq ⭐⭐⭐MediumDay 75Day 76Day 82
184LC-72 Edit Distance ⭐⭐⭐HardDay 75Day 76Day 82
185LC-115 Distinct SubsequencesHardDay 75Day 76Day 82
186LC-221 Maximal Square ⭐⭐MediumDay 75Day 76Day 82
0/1 Knapsack DP
Day 76
JS Template
const dp = new Array(capacity + 1).fill(0); for (const [weight, value] of items) { for (let w = capacity; w >= weight; w--) { dp[w] = Math.max(dp[w], dp[w - weight] + value); } } return dp[capacity];
#ProblemDifficultyPhase 1Phase 2Phase 3
187LC-416 Partition Equal Subset ⭐⭐⭐MediumDay 76Day 77Day 83
188LC-494 Target Sum ⭐⭐MediumDay 76Day 77Day 83
189LC-1049 Last Stone Weight IIMediumDay 76Day 77Day 83
Review — Day 77

Review all Week 11 problems

Mock Interview — Day 78

3 DP problems in 75 minutes

Week 12 · Days 79–84
Palindromic DP
Days 79–80
JS Template
const dp = Array.from({length:n}, ()=>new Array(n).fill(false)); for (let i = 0; i < n; i++) dp[i][i] = true; for (let len = 2; len <= n; len++) { for (let i = 0; i <= n - len; i++) { const j = i + len - 1; if (s[i]===s[j] && (len===2 || dp[i+1][j-1])) dp[i][j] = true; } }
#ProblemDifficultyPhase 1Phase 2Phase 3
190LC-5 Longest Palindromic Substring ⭐⭐⭐MediumDay 79Day 80Review
191LC-647 Palindromic Substrings ⭐⭐MediumDay 79Day 80Review
192LC-516 Longest Palindromic SubseqMediumDay 79Day 80Review
193LC-131 Palindrome Partitioning ⭐⭐MediumDay 80Day 81Review
194LC-132 Palindrome Partitioning IIHardDay 80Day 81Review
Advanced DP
Day 81
#ProblemDifficultyPhase 1Phase 2Phase 3
195LC-139 Word Break ⭐⭐⭐MediumDay 81Day 82Review
196LC-140 Word Break IIHardDay 81Day 82Review
197LC-152 Max Product Subarray ⭐⭐MediumDay 81Day 82Review
198LC-312 Burst Balloons ⭐⭐⭐HardDay 81Day 82Review
Massive Review — Day 82

30 random problems from all 198 — no hints, under 15 min each

Final Mock Interview — Day 83

Real interview simulation: 4 problems in 90 minutes — 1 Easy (15m) + 2 Medium (30m each) + 1 Hard (45m)

Day 84 — Reflection

Review pattern cheat sheet · Identify weak areas · Plan continued practice

You have covered 28 patterns and 198 problems. You are ready for 95% of junior and mid-level backend interviews.

08

All 28 patterns

Arrays & Strings (Weeks 1–2)

  • Two Pointers — Opposite Direction
  • Two Pointers — Same Direction (Fast/Slow)
  • Prefix Sum
  • Kadane's Algorithm
  • Sliding Window — Fixed Size
  • Sliding Window — Variable Size

Hashing & Sorting (Weeks 3–4)

  • HashMap — Frequency Counting
  • HashMap — Subarray Problems
  • Merge Intervals ✨ new
  • Cyclic Sort ✨ new
  • Bitwise XOR ✨ new
  • Modified Binary Search

Linked Lists, Stacks, Heaps (Weeks 5–6)

  • Fast & Slow Pointers (Floyd's Cycle)
  • Linked List Reversal
  • Stack — LIFO
  • Monotonic Stack
  • Two Heaps — For Median ✨ new
  • Heap / Priority Queue

Trees & Backtracking (Weeks 7–8)

  • Tree DFS (Pre/In/Postorder)
  • Tree BFS (Level Order)
  • BST Operations
  • Backtracking — Subsets & Permutations
  • Trie

Graphs (Weeks 9–10)

  • Graph DFS / BFS
  • Union Find (Disjoint Set)
  • Topological Sort (Kahn's)
  • Dijkstra's Shortest Path
  • Greedy Algorithms ✨ new

Dynamic Programming (Weeks 11–12)

  • 1D DP — Linear Recurrence
  • 2D DP — Grid Problems
  • DP on Subsequences (LCS)
  • 0/1 Knapsack
  • Palindromic Subsequence DP
09

Spaced repetition tracker format

Copy this format to a spreadsheet. One row per problem. Update after each phase.

ProblemLC #PatternDay 0Day 1Day 7Day 14Status
Two Sum II167Two Pointers✓✓✓✓✓Mastered
3Sum15Two Pointers⚠️⚠️✓✓✓✓✓Mastered
Trapping Rain Water42Two Pointers⚠️⚠️⚠️✓✓Review again
... continue for all 198 problems
Solved independently ⚠️ Needed help ✓✓ Solved quickly on review ✓✓✓ Pattern mastered