Skip to main content
Harvard
Computer Science
4 credits

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 plan

What 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. 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. 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. 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. 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. 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 free

More Harvard courses