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: ArrayList, LinkedList, HashMap (open addressing OR chaining), PriorityQueue, BST, TrieNode — from scratch, in under 20 minutes each, with tests

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

  1. Implement first, then use stdlib. Every core structure gets a hand-written version and a stdlib version. Compare.

  2. 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.

  3. Test every solution. Even LeetCode problems. Use JUnit or a main with 5+ assertions. study solutions with no tests are wishful thinking.

  4. Pattern-tag every problem in your tracker. See 06_problem_solving_strategy.md for the taxonomy.

  5. 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

  1. 01_arrays_and_strings_deep.md — the patterns 40% of studies live in

  2. 02_linked_lists_stacks_queues.md — cheap to master, essential building blocks

  3. 03_trees_and_graphs.md — the visual-thinking layer

  4. 04_sorting_and_searching.md — the classics, plus Java’s specific choices

  5. 05_dynamic_programming.md — the 20 canonical problems every senior sees

  6. 06_problem_solving_strategy.md — meta-skill: how to think in the room

  7. projects.md — 150 problems + your own MiniCollections library + a public blog post

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

MiniCollections library + tests

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