Harvard CS 124: Data Structures and Algorithms
CS 124 is Harvard's algorithms course — divide and conquer, greedy algorithms, dynamic programming, graph algorithms, hashing, and NP-completeness — combining rigorous analysis with programming assignments. It's a core theory requirement for CS concentrators and a known interview-prep powerhouse.
Fennie is independent and not affiliated with Harvard University. This is an unofficial study guide.
Build my CS 124 study planWhat makes it hard
The psets are the legend: multi-day problem sets where the hard problems require genuine insight, not pattern application. Dynamic programming and reductions are the conceptual peaks, and the course's expectation that you both prove correctness and implement efficiently doubles the workload relative to a pure-theory class.
What you'll cover
- • Divide and conquer and recurrences
- • Greedy algorithms
- • Dynamic programming
- • Graph algorithms and shortest paths
- • Hashing and randomized algorithms
- • NP-completeness and reductions
The CS 124 study guide
How to study for Harvard CS 124, step by step.
- 1
Open every pset the day it's released
CS 124's hard problems need marination — insight arrives on the second or third spaced attempt, not in a single sitting. Read all the problems immediately so your brain can background-process them.
- 2
Master each technique before its pset week
Review divide and conquer, DP, or reductions before the relevant pset drops, working a few textbook problems cold. Learning a technique and applying it creatively in the same week is the overload that breaks people.
- 3
Form a study group inside the collaboration policy
Discussing approaches is allowed and invaluable; write-ups must be solo. Explaining your DP formulation to someone else is also the fastest way to find where it double-counts.
- 4
Practice both halves: prove it and code it
CS 124 grades correctness arguments and efficient implementations. For each algorithm you study, write the proof sketch and the code — exams and psets demand the pairing.
- 5
Block the marination time with Fennie
Upload the CS 124 syllabus and Fennie's Daily Plan spreads pset work across the full week and queues technique review before each one needs it, with practice questions generated from the actual course material. Free to start.
Start my CS 124 plan free
How Fennie helps with CS 124
Fennie's Daily Plans block out pset time across the full week — CS 124 problems need marination, not all-nighters — and schedule review of each technique before it's needed. Chat through why your DP formulation double-counts or how a reduction works, building the understanding the psets demand; the solutions you submit are your own work.
FAQ
Is CS 124 hard?
It's one of the most demanding CS courses at Harvard — psets routinely take 15+ hours and the hard problems require real creativity. It's also one of the most valuable for technical interviews.
What should I know before CS 124?
Comfort with proofs (discrete math at the level of CS 20 or strong math background), programming fluency, and basic data structures. Weak proof skills hurt more than weak coding here.
How do I survive CS 124 psets?
Start the day they're released and let hard problems sit overnight — insight comes from spaced attempts. Form a study group within the collaboration policy, and write up solutions alone.
Pass CS 124 with a plan, not a cram
Upload your CS 124 materials and Fennie generates a Daily Plan paced to your deadline — plus chat, flashcards, and quizzes built from the actual course content.
Get started freeMore Harvard courses
CS50 — Introduction to Computer Science
CS50 is Harvard's famous intro to computer science, taught by David Malan — and through CS50x on edX, almost certainly the most-taken and most-searched college course in the world. It moves from C through data structures, memory, and algorithms to Python, SQL, and web development, ending with a final project.
CS 51 — Abstraction and Design in Computation
CS 51 is the standard course after CS50 for Harvard CS concentrators, teaching functional programming in OCaml alongside design principles — abstraction, modularity, and multiple programming paradigms. It's where students go from making code work to making it well-designed.
CS 61 — Systems Programming and Machine Organization
CS 61 is Harvard's systems programming course — C and C++, assembly, memory, caching, process control, and concurrency — and one of the two standard follow-ons to CS50 for CS concentrators. Its course site publishes lecture notes and problem sets publicly, so it also draws self-learners looking for a systems sequel to CS50.
CS 109A — Data Science 1: Introduction to Data Science
CS 109A — cross-listed as Stat 109A — is the first half of Harvard's data science sequence: data wrangling, exploratory analysis, regression, classification, and model evaluation in Python. Past course materials are published openly on the teaching team's site, giving it a large self-study audience beyond enrolled students.