Skip to main content
Berkeley
Electrical Engineering and Computer Sciences
4 credits

Berkeley CS 170: Efficient Algorithms and Intractable Problems

CS 170 is Berkeley's algorithms course: divide and conquer, graph algorithms, greedy methods, dynamic programming, linear programming, and NP-completeness. It's the theory core of the upper division, building directly on CS 61B's data structures and CS 70's proof skills.

Fennie is independent and not affiliated with UC Berkeley. This is an unofficial study guide.

Build my CS 170 study plan

What makes it hard

170 is where proof-writing and algorithm design fuse: homework asks you to invent an algorithm, prove it correct, and analyze its runtime, and partial understanding produces zero-credit attempts. Exam medians are famously modest, and the dynamic-programming and reduction questions are the classic separators.

What you'll cover

  • Divide and conquer and recurrences
  • Graph algorithms and shortest paths
  • Greedy algorithms
  • Dynamic programming
  • Linear programming and network flow
  • NP-completeness and reductions

The CS 170 study guide

How to study for Berkeley CS 170, step by step.

  1. 1

    Re-sharpen CS 70 proof skills before the semester

    170 assumes you can write induction and exchange arguments cleanly. If your proof muscles atrophied since 70, rebuild them in the first two weeks — the homework assumes them from problem one.

  2. 2

    Attempt every homework problem alone first

    The learning is in the struggle before the study-group discussion. Give each problem a real solo attempt, then collaborate within course policy — students who skip the solo phase consistently underperform on exams.

  3. 3

    Drill dynamic programming as a formula: state, recurrence, base case

    DP questions decide grades in 170. For every practice problem, write the subproblem definition explicitly before any code or recurrence — naming the state precisely is the hard part.

  4. 4

    Practice reductions in both directions

    For NP-completeness, internalize the direction of a reduction and rehearse the standard ones from lecture. Exam reductions are variations on patterns you can train deliberately.

  5. 5

    Calibrate with past exams early, not just before finals

    170 exam problems are novel by design, so the skill is solving fresh problems under time pressure. Start working old exams from the archives mid-semester to build that muscle gradually.

  6. 6

    Make the practice volume automatic with Fennie

    Upload the CS 170 syllabus and Fennie's Daily Plans schedule steady problem work and proof practice to your exam dates, generating DP and reduction practice problems from your actual course materials when you run out. Free to start.

    Start my CS 170 plan free

How Fennie helps with CS 170

Daily Plans pace CS 170 with steady problem volume, because algorithm design is a trained skill and cramming theory fails reliably. Use Fennie's chat to pressure-test your proofs — explain why your greedy exchange argument works and let the holes surface — and generate fresh DP and reduction practice when the problem sets run dry.

FAQ

Is CS 170 hard?

It's one of the harder required CS courses because it fuses proof-writing with algorithm invention — you design something new and prove it correct on every homework. Students solid from CS 70 adapt within weeks; rusty proof skills make the start rough.

What's the hardest part of CS 170?

Most students point to dynamic programming and NP-completeness reductions. Both are trainable: DP rewards explicitly defining the subproblem before anything else, and reductions follow patterns that practice makes recognizable.

How do I prepare for CS 170?

Be honest about your CS 70 proof fluency and 61B data-structure recall — 170 leans on both immediately. Working a few induction and graph proofs before the semester starts removes most of the early shock.

Pass CS 170 with a plan, not a cram

Upload your CS 170 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 Berkeley courses