🧩 DSA Roadmap (Java)

Targets by week 24

  • 350–400 quality problems (mostly medium), each one logged
  • Solve an unseen medium in ≀ 25 min and explain it clearly while coding
  • LeetCode contest rating ~1800+ (a good signal, not a must)
  • Every pattern in Pattern Playbook at least at β€œcan recognize + implement”

Method (this matters more than the number of problems)

  1. Learn the pattern (theory + 2 canonical problems with a solution walkthrough)
  2. Solve 8–15 problems in that pattern, easy β†’ medium β†’ 1–2 hard
  3. 25-min rule: stuck β†’ look at a hint only β†’ another 10 min β†’ read the solution β†’ re-code it from memory the next day
  4. Log it with the DSA Problem template: pattern, key insight (one line), complexity, mistakes
  5. Revise (#revise) on days 3, 7, and 21
  6. Speak while you solve. Practise the interview voice: clarify β†’ examples β†’ brute force β†’ optimize β†’ code β†’ test β†’ complexity

Week-by-week

WeekPattern(s)Target
W1Complexity, Java collections, arrays & hashing15
W2Two pointers, sliding window, prefix sum18
W3Stack, monotonic stack/queue, binary search (+ on answer)18
W4Linked list, recursion, fast/slow pointers15
W5Binary trees: traversals, BFS/DFS, diameter, LCA, serialize18
W6BST, heaps, top-K, two heaps (median), merge K15
W7Backtracking: subsets, permutations, combinations, N-Queens, word search15
W8Graphs I: BFS/DFS, grids, islands, clone graph, bipartite15
W9Graphs II: topo sort (Kahn), union-find, Dijkstra, multi-source BFS15
W10DP I: 1-D (climbing, house robber, decode ways, coin change)15
W11DP II: 2-D/grid/strings (LCS, edit distance, unique paths, palindromes)15
W12DP III: knapsack (0/1, unbounded), LIS, partition, interval DP12
W13Greedy, intervals (merge, meeting rooms, jump game)15
W14Tries, bit manipulation, math, revision15
W15Advanced graphs (MST Kruskal/Prim, Bellman-Ford, Floyd, bridges) + segment tree / Fenwick12
W16DP IV: bitmask, tree DP, DP on subsequences, hard mix10
W17–18Company-tagged mediums (Amazon, Google, Microsoft, Uber, Atlassian, Flipkart)40
W19–22Maintenance: 2 mediums or 1 hard/day + contests60
W23–26Timed mocks, weak-pattern repair40

Problem sources

  • ⭐ NeetCode 150 β†’ NeetCode 250 (pattern-organized; video explanations)
  • Striver’s A2Z DSA sheet / SDE sheet (very popular for Indian MNC prep)
  • LeetCode company-tagged lists (Premium is worth it in W17+)
  • Grind 75 (Tech Interview Handbook) for a final pass
  • Contests: LeetCode weekly (Sunday) + biweekly (Saturday); optional Codeforces Div 3

Books

  • Grokking Algorithms 2e (warm-up) Β· The Algorithm Design Manual (Skiena) Β· CLRS (reference only)
  • Cracking the Coding Interview (classic) Β· Beyond Cracking the Coding Interview (2025, updated strategy)

Related: Pattern Playbook Β· Java DSA Toolkit

πŸ§ͺ Labs (🟒 warm-up β†’ 🟑 core β†’ πŸ”΄ hard β†’ ⚫ boss)

  • 🟑 Speed drills: 3 easy problems in 20 min total, every Monday
  • πŸ”΄ Hard Friday: 1 hard problem, a 60-min limit, then write an editorial for it
  • πŸ”΄ Contest discipline: every LeetCode weekly + biweekly; upsolve every missed problem within 48 h
  • ⚫ Mock marathons from W17: 2 problems in 45 min, spoken aloud, recorded

🧠 Cognitive tasks

  • Predict the complexity and pattern before coding; log accuracy weekly
  • Constraint flip: re-solve a problem with n = 10⁹ or a streaming input
  • Teach-back: explain one solution per day in 2 minutes as if in an interview

πŸ›°οΈ Orbit integration

  • Topo sort β†’ the DAG executor Β· heaps β†’ timers/priority queues Β· union-find β†’ dependency grouping Β· tries β†’ prompt/tool name routing Β· sliding windows β†’ rate limiters Β· consistent hashing β†’ shard routing

Go deeper