UC Berkeley CS61B — Data Structures
Introduction
CS61B is UC Berkeley's classic data structures course, taught by Professor Josh Hug. Using Java as the teaching language, the course has you implement a wide range of data structures and algorithms through carefully designed labs and projects. The emphasis is "learning by doing" — you'll build lists, trees, graphs, hash tables, and sorting algorithms from scratch.
CS61B has an outstanding reputation in the CS self-study community and is widely regarded as one of the best introductory data structures courses available. Its lab design is exceptional — you'll understand the tradeoffs between arrays and linked lists while implementing a Deque, and grasp hashing and graph traversal while building a Git version control system prototype.
Prerequisites
- Programming fundamentals: Familiarity with at least one programming language (Java preferred but not required). CS61A or equivalent programming experience
- Basic OOP concepts: classes, objects, inheritance, interfaces
- No prior algorithms or data structures knowledge required
Difficulty
🌟🌟⭐ (Medium)
The first half (basic data structures and Java syntax) is relatively accessible. The second half (graph algorithms, sorting, concurrency) ramps up significantly. Project 2B (building a Git prototype) and Project 3 (building a game engine) are the course highlights and require substantial time investment.
Estimated Study Hours
Approximately 120-150 hours (including labs and projects)
- Lectures: ~40 hours
- Labs: ~20 hours
- Projects: ~50-80 hours
- Review and exam prep: ~10-20 hours
Course Resources
- Course website: sp21.datastructur.es
- Lecture videos: YouTube playlist
- Code and labs: GitHub
- Textbook: Hug's Data Structures (free online)
Self-Study Tips
-
Do the labs and projects. Watching lectures is just warm-up — real learning happens when you write code. CS61B's labs are exceptionally well-designed, each centered around a core concept.
-
Don't skip Project 2 (Deque). This project asks you to implement a deque using both arrays and linked lists, making it the best exercise for understanding how data structure choice affects performance.
-
Project 3 (Ngordnet) is optional but highly recommended. You'll build an N-gram-based historical trend query tool involving graph algorithms and data processing — genuinely fun.
-
Use the provided JUnit tests. CS61B provides complete test frameworks for every lab and project. Run the tests first, see which ones fail, then debug targetedly.
-
If you're not comfortable with Java, spend 1-2 weeks on Java basics first. The course assumes Java proficiency, and struggling with syntax early on is painful.
-
Pair with Algorithms, 4th Edition by Sedgewick. The book and CS61B content are highly complementary, with many chapters directly corresponding.