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

Berkeley CS 61B: Data Structures

CS 61B is Berkeley's data structures course, taught in Java, covering lists, trees, hashing, graphs, sorting, and asymptotic analysis. It's the second course in the 61 series and the one most cited in industry-interview prep — its projects, including the famous build-your-own-world and Gitlet (build a mini Git), are substantial software engineering exercises.

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

Build my CS 61B study plan

What makes it hard

The projects are the heart and the workload: Gitlet alone takes many students 30+ hours, with an autograder and limited tokens that force you to test your own code. Exams demand fluency in asymptotics and data structure internals, and the midterm difficulty is a perennial topic on the Berkeley subreddit.

What you'll cover

  • Java and object-oriented design
  • Linked lists, trees, and balanced search trees
  • Hashing and hash tables
  • Heaps and priority queues
  • Graph algorithms
  • Sorting and asymptotic analysis

The CS 61B study guide

How to study for Berkeley CS 61B, step by step.

  1. 1

    Start Gitlet the week it drops

    Gitlet runs 30-60 hours for most students, and the limited autograder tokens mean you can't debug by resubmitting. Students who start the release week consistently report a completely different experience than late starters.

  2. 2

    Write your own tests for every project

    With token-limited autograding, your test suite is your real safety net. Building tests also forces the design thinking that 61B projects are actually teaching.

  3. 3

    Learn invariants, not implementations

    For each structure — BSTs, heaps, hash tables — be able to state the invariant and explain why each operation preserves it. Exam questions probe that understanding far more than memorized code.

  4. 4

    Keep asymptotics review running all semester

    Big-O fluency decays without contact. A few minutes of runtime-analysis practice per week beats relearning it before each exam, and the midterms lean on it hard.

  5. 5

    Work the TBP and HKN exam archives

    Berkeley's student-run past-exam archives are the canonical 61B prep. Work old midterms timed and on paper — midterm difficulty is a perennial subreddit topic for a reason.

  6. 6

    Let Fennie orchestrate it

    Upload the CS 61B schedule and Fennie's Daily Plans start project work early and keep exam prep continuous, with asymptotics flashcards and practice quizzes generated from your actual course content. Free to start — the project code stays yours.

    Start my CS 61B plan free

How Fennie helps with CS 61B

Fennie's Daily Plans map the CS 61B semester so project work (especially Gitlet) starts early and exam prep never stops entirely. Use chat to reason about invariants and why a data structure behaves the way it does, and drill asymptotic-analysis flashcards until Big-O answers are reflexive — Fennie supports your understanding; the project code is yours to write.

FAQ

Is CS 61B harder than CS 61A?

Most students say the workload is heavier in 61B because of the projects, while 61A is more conceptually disorienting. If recursion broke your brain in 61A, 61B feels more concrete — but budget serious hours for Gitlet and the other projects.

How long does Gitlet take in CS 61B?

Commonly 30-60 hours across a few weeks. It's a design-heavy project with limited autograder tokens, so writing your own tests is essential. Students who start the week it's released consistently report a far better experience.

Do I need 61A before 61B?

CS 61A (or equivalent programming background) is the expected preparation. The Java is taught from scratch, but the course assumes you already think in functions, recursion, and basic program design.

Pass CS 61B with a plan, not a cram

Upload your CS 61B 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