Learn data structures and algorithms in four months

Four months at about 90 minutes a day takes someone who can already program in one language to solid working knowledge of the core data structures and the ability to pass a typical coding interview. Roughly 180 hours. You will not be a competitive programmer. You will recognize which tool a problem needs.

4 months · ~180 hours · solve most LeetCode medium problems in under 40 minutes

Weeks 1–3 · 1 hr/day

1.Grokking Algorithms, 2nd edition

Aditya Bhargava's illustrated book covers Big O, binary search, recursion, hash tables, graphs, Dijkstra, dynamic programming and more in plain language. It is short and it is not rigorous — that's the point. Read it in three weeks to build intuition, and implement every algorithm yourself in your main language before moving on.

~$40–50 print from Manning, ebook cheaper

Grokking Algorithms →
Weeks 4–10 · 1.5 hr/day

2.Algorithms, Part I — Princeton (Coursera)

Robert Sedgewick and Kevin Wayne's course is the rigorous counterpart: union-find, sorting, priority queues, symbol tables, balanced search trees, hashing, with real analysis. The programming assignments are the best part, graded by an autograder that checks correctness and performance. Do every one. The course uses Java; if you write another language, do the assignments in Java anyway — it isn't hard to pick up. Part II covers graphs and strings if you want more.

Free to audit, including assignments

Algorithms, Part I →
Weeks 11–17 · 1.5 hr/day

3.NeetCode 150

A curated list of 150 LeetCode problems grouped by pattern — two pointers, sliding window, trees, heaps, backtracking, graphs, dynamic programming — each with a free video explanation by Navdeep Singh. Give each problem 30 minutes on your own before watching the solution. Re-solve any problem you failed a week later, from scratch. The patterns, not the problems, are what you're learning.

Free list and videos; LeetCode free tier is enough

NeetCode roadmap →

If this doesn't fit you

If you want theory for its own sake rather than interviews or practical work, replace steps 1 and 3 with Steven Skiena's The Algorithm Design Manual and his free Stony Brook lecture videos. It is denser and far more useful than CLRS for self-study, and its war stories teach how algorithms show up in real problems.

Why this path

People fail at algorithms in two opposite ways: grinding hundreds of LeetCode problems without understanding why solutions work, or reading CLRS cover to cover and never solving anything under time pressure. This path does intuition, then rigor, then pattern practice. Grokking makes the ideas friendly, Princeton makes them precise, and NeetCode makes them fast. Do not skip the Princeton assignments; they are where the understanding actually forms.