Skip to content

Zero-to-Hero Roadmap ​

πŸ“… My roadmap progress
0 / 10 weeks Β· 0%
  • ☐W1 β€” Foundations
  • ☐W2 β€” Arrays / Hashing / Prefix Sum
  • ☐W3 β€” Two Pointers / Binary Search
  • ☐W4 β€” Stacks / Monotonic / SW Max
  • ☐W5 β€” Heaps / Top-K / K-way Merge
  • ☐W6 β€” Trees / BSTs / Trie
  • ☐W7 β€” Graphs / BFS-DFS / Topo / UF
  • ☐W8 β€” DP / Backtracking / Design
  • ☐W9-10 β€” Rehearsal
  • ☐W11-12 β€” Final push
Click a week to toggle done. Progress persists on this device.
Your Progress
Local Data Manager
0
Solved
0
Quizzes
0
Feedback
0
Page views
All progress is stored in your browser. Nothing is sent to a server. Export to move between devices.

A concrete, day-by-day plan a working engineer can actually follow. The book will not teach you if you read it front-to-back like a novel β€” patterns stick only through spaced practice on canonical problems. This chapter tells you exactly what to do on Monday morning.

Pre-flight quiz β€” are you ready for patterns? ​

Do NOT start Part II until you can answer these ten in under 30 seconds each without looking anything up. If you miss more than two, go finish Part I first.

  1. What is the time complexity of list.contains(x) when list is an ArrayList<Integer> of size n? (O(n) β€” it's a linear scan.)
  2. What is the amortized cost of HashMap.put? What's the worst case? (O(1) amortized; O(n) worst if every key collides.)
  3. In ArrayDeque, which end is push/pop? Which end is offer/poll? (push/pop = head, LIFO. offer/poll = tail-in, head-out, FIFO.)
  4. What's Integer.MIN_VALUE * -1 in Java? (Still Integer.MIN_VALUE β€” overflow wraps.)
  5. Given n = 10⁡, which complexities fit under 1 second? (O(n), O(n log n), O(n √n). O(n²) is borderline; O(n³) fails.)
  6. What does (lo + hi) / 2 fail on, and what's the fix? (Overflow when lo + hi > Integer.MAX_VALUE. Use lo + (hi - lo) / 2.)
  7. In TreeMap<Integer,V>, what does floorKey(x) return? (The greatest key ≀ x, or null if none exists.)
  8. What's the difference between String.equals and ==? (equals compares content; == compares references. Interned strings can accidentally pass ==.)
  9. What's the space complexity of a recursive function that recurses n times without tail-call optimization? (O(n) β€” Java doesn't do TCO; every frame stays on the stack.)
  10. Why is ArrayDeque preferred over Stack in modern Java? (Stack extends Vector which is synchronized; ArrayDeque is faster and idiomatic.)
Score interpretation

9-10: skip Part I, start Part II. 6-8: skim Part I, focus on gaps. ≀ 5: read Part I fully before Part II.

The three tracks β€” pick one ​

Your track depends on your calendar constraint, not your skill level. All three land at the same competence β€” they just spread it differently.

TrackWeeksWeekly commitmentFor whom
Sprint415–20 hrsInterview in a month; strong Java baseline
Standard88–10 hrsInterview in ~two months; want depth without cramming
Marathon125–7 hrsLong-horizon prep; also learning fundamentals

Below I lay out the Standard 8-week plan as the default. Sprint compresses each pair of weeks into one; Marathon expands each week into 1.5.

The weekly cadence β€” do the same shape every week ​

Every week (regardless of track), your five practice sessions look like this:

SessionDurationWhat you do
Study (Mon)60 minRead one pattern chapter's story + templates + one canonical problem. No coding yet.
Canonical (Tue/Wed)45 min Γ— 2Code the week's 2 canonical problems from scratch on a blank editor. Time yourself.
Variations (Thu)45 minSolve 2 variations of the week's pattern β€” proves you learned the idea, not the specific solution.
Weakness (Fri)60 minPick any problem you failed earlier and re-solve it without looking. This is where retention actually happens.
Mock (Sat)60 minFull mock β€” think aloud, clarify, brute force β†’ optimize β†’ code β†’ verify. Grade yourself with the interview playbook.

Sundays are for rest. Retention needs sleep, not extra grinding.

The 30% rule

At least 30% of your weekly hours must go to problems you've already solved once. Fresh problems feel productive; re-solving is where mastery is built. If you skip re-solving, you'll forget every pattern within 3 weeks of the interview.

The 8-week Standard Plan ​

Week 1 β€” Foundations you can't skip ​

  • Read: 06-java-ds.md (Java primer). 07-java-gotchas.md. 10-complexity.md.
  • Do: On paper, without an IDE, implement:
    • A stack using an array (grow-when-full)
    • A hash map with open addressing (linear probing)
    • Binary search β€” the [lo, hi) half-open version only
  • Canonical: Two Sum, Valid Anagram β€” with both brute-force and optimized versions and complexity for each.
  • Weekend mock: Two Sum, aloud, timed. Grade yourself: did you propose brute force first? Did you state complexity before coding?

Week 2 β€” Arrays, Hashing, Prefix Sum ​

Week 4 β€” Stacks, Queues, Monotonic Stack, Sliding Window Max ​

Week 5 β€” Heaps, Top-K, K-way Merge, Quickselect ​

Week 6 β€” Trees, BSTs, Trie ​

Week 7 β€” Graphs, BFS/DFS, Topo Sort, Union-Find ​

Week 8 β€” DP, Backtracking, Design ​

Weeks 9–10 (Sprint = W3-4; Marathon = spread across weeks 9-14) ​

Retention consolidation. No new patterns. Re-solve everything.

  • Monday: Re-solve one problem from every pattern you learned (that's 21 problems in ~5 hrs β€” you'll be fast now).
  • Tuesday–Thursday: One mock interview per day, unseen problems from LeetCode top-100.
  • Friday: Grade all three mocks against the interview playbook rubric. Fix your weakest phase.

Weeks 11–12 (final push, or first two weeks of Marathon closing) ​

System design overlay + hard problems.

What "you're ready" looks like ​

Sign one is easy: you recognize the pattern in under 30 seconds. But that's not sufficient. All three of these must be true:

  1. Recognition β€” You read a problem and, within 30 seconds, you can name the pattern and often the exact template you'll use.
  2. Communication β€” You can walk through your solution aloud without freezing, and you naturally propose brute-force before optimized. You know the complexity of every step before you write it.
  3. Recovery β€” When your first idea doesn't work, you don't panic. You state what changed, propose an alternative, and move on. This is the difference between senior and mid-level.

If any of the three is missing, keep drilling. The book has enough material for another full pass.

Anti-pattern to avoid

Grinding 500 LeetCode problems without a plan. Volume without spacing doesn't build recognition. 60 canonical problems drilled 3Γ— each beats 500 problems solved once. That's the entire premise of this book.

Signs you're ready for staff-level (not just senior) ​

Passing a senior interview requires the three above. Staff adds three more:

  1. Decomposition β€” You can turn a fuzzy real-world problem ("build me a rate limiter") into concrete data-structure choices with tradeoffs you can defend.
  2. Approximation β€” You know when the "optimal" answer isn't worth it. Bloom filter instead of hash set (memory), quickselect instead of sort (need only k-th), sampling instead of full scan.
  3. Systems eye β€” You spot when a DSA problem is really a systems problem. "Design a top-K feed" isn't PriorityQueue; it's count-min sketch + heavy hitters + heap merge β€” and you'd never fit that on a whiteboard, so you narrate the tradeoff.

If you hit staff signal in the first 20 minutes of an interview, expect harder problems. The book helps here but real staff interviews test judgment as much as code.

Common mistakes on this roadmap ​

  • "I'll skip the pre-flight quiz." Do the quiz. If you can't answer autoboxing / overflow / ArrayDeque, you'll waste hours debugging Java specifics that have nothing to do with the algorithm. The quiz takes 5 minutes.
  • "I'll do 10 problems this weekend and catch up." Retention is a function of spacing, not volume. Ten problems in a weekend are forgotten by Wednesday. Two problems per day for five days aren't.
  • "I'll skip the mocks β€” I'll do them when I feel ready." You'll never feel ready. The whole point of the mock is to expose what you don't yet have. Do them from Week 1.
  • "I'll just read the book." Reading builds recognition; only writing code builds recall. The plan asks for 2 canonical + 2 variations + 1 re-solve per week for a reason.
  • "I'll skip re-solving problems I already got right." This is the single biggest mistake. See "30% rule" above. Retention decays exponentially without re-exposure.

What to do when you're stuck ​

Every serious engineer gets stuck. Here's the escalation order β€” do NOT skip steps.

  1. Re-read the problem statement. Half of stuck-ness is misread constraints (n ≀ 10⁡ vs 10⁷ changes everything).
  2. State an example. Pick the smallest input the problem allows. Trace what the answer should be by hand.
  3. State the brute force. Even if it's O(nΒ³) β€” say it out loud. This unlocks the "optimize what?" question.
  4. Look at what the input is shaped like. Sorted? β†’ binary search / two pointers. Overlapping ranges? β†’ merge intervals. Prefix / suffix? β†’ prefix sum. Contiguous? β†’ sliding window.
  5. Read only the pattern's Recognize-by callout in this book β€” not the code. If it clicks, close the book and code it.
  6. Look at the code template β€” but not the specific problem's solution.
  7. Look at the solution. Now: close everything, re-solve from a blank editor 24 hours later. If you can't, you didn't learn β€” you copied.

Discipline in step 7 is the single biggest predictor of interview success.

Released under MIT license.

πŸ’‘ Quick shortcuts
H HintsR Run JavaA AI Help