Week 2 — Linked Lists + Kadane Intro
Days 8–14 · 5 flagship problems · ~25 LC Bank · 0 mocks
Theme
Pointer mechanics + your first non-trivial DP pattern. The linked-list problems exist almost entirely so the interviewer can watch you draw boxes and arrows on a whiteboard without panicking. Kadane is your first taste of “the DP recurrence hides inside a single scan.”
Goals
- Pointer manipulation without losing nodes (reverse, merge, cycle-detect)
- The three-pointer dance for in-place reversal (prev / curr / next)
- Floyd’s tortoise-and-hare and why it provably terminates
- Kadane’s algorithm as a 1D DP with two-state collapse to scalars
- HashSet as the brute-force baseline for duplicate detection — then trade off
Daily Schedule
| Day | Reading | Flagship | Bank |
|---|---|---|---|
| Mon | phase-01 §4 Linked Lists | p06 Reverse Linked List | 3 LC Easies |
| Tue | phase-01 §4 (re-read), focus on dummy-node pattern | p07 Merge Two Sorted Lists | 3 LC Easies |
| Wed | phase-02 §1 Two Pointers | p08 Linked List Cycle | 3 LC Easies |
| Thu | phase-05 §1 1D DP intro | p09 Maximum Subarray (Kadane) | 3 LC Easies |
| Fri | phase-01 §3 HashMap Mastery re-read | p10 Contains Duplicate | 3 LC Easies |
| Sat | Re-solve p06–p10 unaided | — | 5 LC Easies + REVIEW |
| Sun | COMMUNICATION.md re-read + spaced repetition logging | — | 5 LC Easies |
LC Bank (Problems to solve on your own after flagship)
LC 234 (Palindrome Linked List), 876 (Middle of Linked List), 83 (Remove Duplicates from Sorted List), 203 (Remove Linked List Elements), 160 (Intersection of Two Linked Lists), 92 (Reverse Linked List II — Medium), 19 (Remove Nth Node from End), 142 (Linked List Cycle II — Medium), 121 (Best Time, again, for muscle memory), 122 (Best Time II — greedy), 53 (Maximum Subarray — your flagship), 152 (Maximum Product Subarray — Medium, the “hidden two-state” follow-up), 198 (House Robber), 70 (Climbing Stairs, again), 746 (Min Cost Climbing Stairs), 217 (Contains Duplicate — your flagship), 219 (Contains Duplicate II — sliding-window preview), 268 (Missing Number), 136 (Single Number — XOR trick), 387 (First Unique Character), 242 (Valid Anagram), 49 (Group Anagrams — preview), 599 (Minimum Index Sum of Two Lists), 350 (Intersection of Two Arrays II), 202 (Happy Number — Floyd on integers).
Readiness Gate
- All 5 flagship problems Section 9 checklists green
- 25+ Bank problems solved unaided
- Can draw the three-pointer reverse on a whiteboard from memory in <60 seconds
- Can explain why tortoise-and-hare must meet inside a cycle (modular arithmetic argument)
-
Can state Kadane’s recurrence as
dp[i] = max(nums[i], dp[i-1] + nums[i])and the two-scalar collapse - Honest self-assessment: Level Delta = Senior or above on at least 2 flagships (Kadane is the hard one)
What’s intentionally NOT here yet
- Doubly linked lists — Phase 1 has it; flagship coverage is in Month 2 (LRU Cache).
- Reverse Linked List II (range reverse) — in the Bank; flagship treatment comes in Month 3.
- Cycle II (find the start of the cycle) — Bank only; the math derivation is Month 3 flagship.
- Kadane variants (max product, circular subarray) — Bank previews; flagship treatment in Month 5 DP block.