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 sohum11 (at) berkeley (dot) edu :)

ADTs

  1. Problem
    ADT Selection

Arrays

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

Asymptotics

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

Bits

  1. Problem
    Bits Runtime
  2. Problem
    Round Down

Classes

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

Comparators

  1. Problem
    DMS Comparator

Disjoint Sets

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

Dynamic Method Selection

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

Graphs

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

Hashing

  1. Problem
    Hashing Gone Crazy

Heaps

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

Iterators

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

LLRBs

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

Linked Lists

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

MSTs

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

Shortest Paths

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

Sorting

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

Trees

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

Tries

  1. Problem
    A Wordsearch