cs61b

A collection of some of the resources I’ve created over my time teaching CS 61B.

First off, for those unfamiliar with 61B, it is the data structures and algorithms class at UC Berkeley. I had the privilege of TAing 61B from Spring 2020 to Spring 2022, and over the semesters, I created challenging problems and recorded intuitive videos.

Each unstarred problem below is one I wrote for a past advanced discussion worksheet, and most I recorded a video explanation for as well. The starred problems are ones I didn’t write myself, but I recorded a video explanation for. All the video explanations are linked in the solutions.

I also created several content review videos and wrote a few guides, so those are linked as well! All the resources are grouped by topic, and the topics are sorted alphabetically. Some of the topics may not be in scope during your 61b semester.

Finally, if you take advantage of any these resources, I’d love to hear, so shoot me an email at sohum511 (at) gmail (dot) com :)

Tries

  1. Problem
    A Wordsearch
    Tries

Trees

  1. Alpha Beta Pruning — (not so mini) Lecture
    Trees
  2. Problem
    Binary Trees
    Trees
  3. Problem
    An Unintuitive Game
    Trees

Sorting

  1. Guide
    Sorting Notes
    Sorting
  2. LSD Sort and Counting Sort
    Sorting
  3. Selection Sort
    Sorting
  4. Insertion Sort
    Sorting
  5. Heapsort
    Sorting
  6. Quicksort
    Sorting
  7. Mergesort
    Sorting
  8. Problem
    Conceptual Sorts*
    Sorting
  9. Problem
    Shuffled Exams
    Sorting
  10. Problem
    Identifying Sorts*
    Sorting
  11. Problem
    MSD Radix Sort
    Sorting
  12. Problem
    Sorted Runtimes
    Sorting
  13. Problem
    Bears and Beds
    Sorting
  14. Problem
    Aliens Arrive at Moon Base
    Sorting

Shortest Paths

  1. Dijkstra’s Intuition, Algorithm, and Runtime
    Shortest Paths
  2. A* Intution
    Shortest Paths
  3. Problem
    Conceptual Shortest Paths*
    Shortest Paths
  4. Problem
    Graph Algorithm Design
    Shortest Paths
  5. Problem
    Oracle Dijkstra’s*
    Shortest Paths
  6. Problem
    A* and Dijkstra’s
    Shortest Paths

MSTs

  1. Problem
    Graph Algorithm Design
    MSTs
  2. Problem
    Kruskal’s
    MSTs
  3. Problem
    Multiple MSTs
    MSTs
  4. Problem
    Prim’s
    MSTs
  5. Problem
    Introduction to MSTs*
    MSTs

Linked Lists

  1. Problem
    Partition
    Linked Lists
  2. Problem
    Challenge: Frauds List
    Linked Lists
  3. Problem
    Even Odd
    Linked Lists
  4. Problem
    Skippify (Spring ’17, MT1)*
    Linked Lists

LLRBs

  1. Slides
    LLRB Slides
    LLRBs
  2. 2-3 Trees and LLRBs
    LLRBs
  3. Problem
    Trees
    LLRBs
  4. Problem
    Balancing Trees*
    LLRBs
  5. Problem
    LLRB Maximization
    LLRBs
  6. Problem
    LLRBs
    LLRBs
  7. Problem
    LLRB Insertions
    LLRBs

Iterators

  1. Problem
    Iterator of Iterators*
    Iterators
  2. Problem
    Filtered List*
    Iterators

Heaps

  1. Problem
    Heap Mystery
    Heaps
  2. Problem
    Fill in the Blanks
    Heaps
  3. Problem
    Heaps
    Heaps

Hashing

  1. Problem
    Hashing Gone Crazy
    Hashing

Graphs

  1. Problem
    DFS, BFS, Dijkstra’s, A*
    Graphs
  2. Problem
    Graph Conceptuals
    Graphs

Dynamic Method Selection

  1. Inheritance and Dynamic Method Selection
    Dynamic Method Selection
  2. Problem
    Challenge: A Puzzle
    Dynamic Method Selection
  3. Problem
    Hidden Fruits
    Dynamic Method Selection
  4. Problem
    Dynamic Method Selection*
    Dynamic Method Selection
  5. Problem
    Athletes
    Dynamic Method Selection

Disjoint Sets

  1. Disjoint Sets
    Disjoint Sets
  2. Problem
    Asymptotics of Weighted Quick Unions
    Disjoint Sets

Comparators

  1. Problem
    DMS Comparator
    Comparators

Classes

  1. Problem
    Quik Maths*
    Classes
  2. Problem
    Static Books
    Classes
  3. Problem
    Give em the ’Ol Switcheroo*
    Classes
  4. Problem
    Containers
    Classes

Bits

  1. Problem
    Bits Runtime
    Bits
  2. Problem
    Round Down
    Bits

Asymptotics

  1. Guide
    How To Approach Recursive Asymptotics
    Asymptotics
  2. How To Approach Recursive Asymptotics
    Asymptotics
  3. Common Asymptotic Confusions
    Asymptotics
  4. Asymptotic Bounds
    Asymptotics
  5. Problem
    Slightly Harder (Spring 2017, MT2)*
    Asymptotics
  6. Problem
    Asymptotics is Fun!
    Asymptotics
  7. Problem
    Boolean Confusion
    Asymptotics
  8. Problem
    Asymptotics Introduction
    Asymptotics
  9. Problem
    Gamma
    Asymptotics
  10. Problem
    Prime Factors
    Asymptotics
  11. Problem
    Flip Flop
    Asymptotics
  12. Problem
    Asymptotic Expressions
    Asymptotics
  13. Problem
    Finish the Runtimes
    Asymptotics

Arrays

  1. Problem
    IntList to Array*
    Arrays
  2. Problem
    Fill Grid
    Arrays

ADTs

  1. Problem
    ADT Selection
    ADTs