The CS106B Midterm will be held over two days: Wednesday July 19th, and Thursday, July 20th, in class.

The exam is closed book, closed notes, and no internet. You are allowed a 1-page, back-and-front sheet of notes for the exam, and you are also allowed the reference sheet below, which you may annotate and bring to class.

Wed/Thur, July 19/20
Midterm Review Session
Mon, July 17
Time TBA
Room TBA


The midterm covers the material presented in class through the lecture on Wednesday, July 12th. Specifically you will be responsible for:

  1. Functions and Pass by Reference
  2. Big O
  3. Use of Collections (Maps, Sets, Stacks, Queues, Vectors and Grids)
  4. Recursion (Definition and Fractals)
  5. Recursive Exploration and Backtracking

The bulk of the midterm will be build on the concepts you covered in the assignments you have completed up to this point in the course (Life, WordLadder/Ngrams/Cipher, Recursion, Backtracking).

We put together handouts on the topics which we will expect you to know:


Exams are exciting, and a good chance to learn. Sometimes they can feel competitive. Remember though that in the long term you aren't competing against the other people in the classroom. In fact they will probably be your team mates in the post Stanford world. The only race is with yourself. We don't curve the exam. If everyone does a great job of demonstrating that they understand the material, everyone will get a better grade.

Here is a printable handout with a complete list of all CS106B library functions you may find useful on the exam and a handout on exam strategies:

Practice Midterms

Practice midterms are delivered as a BlueBook exam (password: practice), meaning that you should try to take it on the computer. We have also provided a PDF of the questions in case you cannot get your computer to run BlueBook (you should try to fix this before the midterm).

Review Video (TBD)