Phase 02 — Core Java DSA¶
Months 2–4 · ~8–10 weeks · 10–15 hrs/week
Data structures and algorithms in raw Java. Not “problems you leetcoded once and forgot” — implement the primitive first, understand why it behaves how it does, then use the standard library version. This is the phase that separates people who can write a hash map from people who only import one.
Your goal by the end: a coding round is not a source of stress. When a problem lands, the pattern surfaces within 60 seconds and your fingers move without pause. You should be able to implement HashMap, ArrayList, PriorityQueue, and a binary search tree from scratch, in Java, in under 20 minutes each, with tests.
Why implement things you’ll never re-implement at work?¶
Because the study asks for it, yes. But more importantly: once you’ve built a hash map by hand, HashMap.computeIfAbsent stops being a magic incantation and becomes an obvious operation on a bucket array. Once you’ve written quicksort, Arrays.sort deciding to switch algorithms at length 47 stops being trivia and becomes a design decision you understand. Understanding through implementation is not academic — it’s the fastest path to reflexive fluency.
Exit criteria¶
You are done with Phase 02 when all are true:
# |
Criterion |
Verification |
|---|---|---|
1 |
150 problems solved: 60 easy / 70 medium / 20 hard |
Tracked in a public GitHub repo; problems tagged by pattern |
2 |
Can implement any of: |
Time yourself. Record video once. Watch back. |
3 |
Complexity analysis is reflexive: state Big-O for time and space without pausing for any of the 20 canonical DP problems and any sort algorithm |
Rubber-duck out loud to yourself |
4 |
Can name the pattern for a problem within 60 seconds of reading it, on 80% of medium problems |
Use a private set of 20 unseen mediums as a check |
5 |
Blog post published: “20 DSA patterns that solve 80% of LeetCode” |
Public URL |
Miss any one of these, keep working. Do not move to Phase 03 half-baked. Phase 03 (design patterns) and beyond assume this is solid.
The rules of Phase 02¶
Implement first, then use stdlib. Every core structure gets a hand-written version and a stdlib version. Compare.
Complexity analysis in every solution. Comment at the top:
// Time: O(n log n), Space: O(1). If you can’t write that comment confidently, you don’t understand your solution yet.Test every solution. Even LeetCode problems. Use JUnit or a
mainwith 5+ assertions. study solutions with no tests are wishful thinking.Pattern-tag every problem in your tracker. See
06_problem_solving_strategy.mdfor the taxonomy.Use AI only for hints AFTER 45 minutes of struggle. Struggle is where learning happens. If you cave at 5 minutes, you learned nothing.
Read order¶
01_arrays_and_strings_deep.md— the patterns 40% of studies live in02_linked_lists_stacks_queues.md— cheap to master, essential building blocks03_trees_and_graphs.md— the visual-thinking layer04_sorting_and_searching.md— the classics, plus Java’s specific choices05_dynamic_programming.md— the 20 canonical problems every senior sees06_problem_solving_strategy.md— meta-skill: how to think in the roomprojects.md— 150 problems + your ownMiniCollectionslibrary + a public blog post
Recommended external resource¶
NeetCode 150 (neetcode.io) is community-verified as the highest-signal problem list. It maps to the pattern taxonomy in file 6. Do the 150 in Java. Free tier is enough. If you finish and want more, do NeetCode 250 or Blind 75 for reinforcement (there is significant overlap).
LeetCode’s own “LeetCode Crash Course - Data Structures and Algorithms” is the paid alternative and it’s excellent, but $35/month adds up. NeetCode free + LeetCode free tier is enough.
Do not buy a $500 course. The gap between free-tier resources and paid ones is small; the gap between “did the work” and “watched the video” is huge.
Time budget (10–15 hrs/week × 9 weeks ≈ 100 hrs)¶
Block |
Hours |
|---|---|
Reading the seven markdown files |
8 |
150 problems @ 25–40 min each (some redos) |
65 |
|
12 |
Blog post writing + revising |
5 |
Redos / mock timed rounds |
10 |
⚠️ What most people get wrong¶
They solve 300 problems without pattern-tagging and can’t recognize a two-pointer problem in month 6. Volume without categorization is memorization. Every problem you solve gets one primary pattern tag and up to two secondary tags. When you re-see a problem three weeks later, you’re rebuilding the pattern, not the specific solution.
Also: do not sit on hard problems for 3 hours. That’s not learning, that’s suffering. 45 minutes of genuine struggle → look at the hint (not the solution). Another 30 minutes → look at the approach (not the code). Another 20 minutes → look at the code, understand it, close it, rewrite it from scratch tomorrow.
Return to ../README.md · Next: 01_arrays_and_strings_deep.md