Our second midterm exam goes out today. It's due in 47 hours (Sunday, March 14th at 12:30PM Pacific time).
You can do this. Best of luck on the exam!
The last programming assignment of the quarter, Huffman Coding, goes out today. It's due on Friday, March 19th at the start of class (11:30AM Pacific).
In this assignment, you'll implement a compression algorithm using Huffman coding, tying together your knowledge of priority queues, pointers, linked structures, and trees. We hope it's a fitting capstone to the quarter!
This assignment may be done in pairs. Please see our pair programming page for details about working with a partner.
Good luck!
Our second midterm exam is coming up next week. It's a 48-hour 47-hour take-home exam that goes out
on Friday, March 12th at 12:30PM Pacific time and comes due on Sunday, March 14th at
12:30PM. The Pacific time zone enters Daylight Saving Time during the time when the exam is out, so
the deadline is only 47 hours after the exam is released, rather than the expected 48. Please check when
12:30PM is on Sunday, March 14th in your local time zone to ensure you submit on time.
For full details about the exam and the exam format, check out the second midterm logistics handout. Note that some of the policies, particularly with regards to style grading, have changed from the first midterm.
We've posted a comprehensive set of practice problems that you can use to prepare for the exam. Each problem here is taken from a past CS106B midterm, and should give you a decent sense of what kinds of questions we've given out before.
Assignment 8: The Adventures of Links, goes out today. It's due on Friday, March 12th at the start of class (11:30AM Pacific).
This assignment is all about linked structures. In the first part, you'll use your skills with the debugger to escape from a maze made of linked cells. In the second, you'll write a set of routines to manipulate DNA strands encoded as linked lists.
This assignment may be done in pairs. Please see our pair programming page for details about working with a partner.
Good luck!
Assignment 7: The Great Stanford Hash-Off, goes out today. It's due on Friday, March 5th at the start of class (11:30AM Pacific).
In this assignment, you'll build two different implementations of a hash table, the first using linear probing and the second using Robin Hood hashing. This will give you a better feel for how different implementation strategies give different efficiencies, and will give you a better glimpse at the sort of creativity that goes into making all our programs run just a bit faster.
This assignment may be done in pairs. Please see our pair programming page for details about working with a partner.
Good luck!
Assignment 6: Data Sagas, goes out today. It's due on Friday, February 26th at the start of class (11:30AM Pacific).
In this assignment, you'll implement your own container type (a priority queue) and use it to build a fast algorithm for finding the best elements in a data stream. You'll also get to see your code in action on real-world data sets.
This assignment may be done in pairs. Please see our pair programming page for details about working with a partner.
Good luck!
Our first midterm exam goes out today. It's due in 48 hours (Sunday, February 14th at 12:30PM Pacific time).
You can do this. Best of luck on the exam!
Assignment 5: Bag'O Big-O, goes out today. It's due on Friday, February 19th at the start of class (11:30AM Pacific).
This assignment explores big-O notation and talks about sorting algorithms along the lines of the ones we saw in class last week. We've intentionally made this assignment much smaller than previous assignments - we know you have a midterm to work on this weekend.
This assignment may be done in pairs. Please see our pair programming page for details about working with a partner.
Good luck!
Our first midterm exam is coming up next week. It's a 48-hour take-home exam that goes out on Friday, February 12th at 12:30PM Pacific time and comes due on Sunday, February 14th at 12:30PM.
For full details about the exam and the exam format, check out the midterm logistics handout.
We've posted a comprehensive set of practice problems that you can use to prepare for the exam. Each problem here is taken from a past CS106B midterm, and should give you a decent sense of what kinds of questions we've given out before.
The fourth assignment of the quarter, Assignment 4: Recursion to the Rescue!, goes out today. It's due on Friday, February 12th at the start of class (11:30AM Pacific).
This assignment is designed as a capstone to our treatment of recursive problem-solving. In it, you'll solve a pair of recursive backtracking problems that will give you a sense for just how impressive a technique recursion can be. And, along the way, you'll learn a bunch of useful techniques for debugging recursive code.
This assignment may be done in pairs. Please see our pair programming page for details about working with a partner.
Good luck!
We've just released our next assignment, Assignment 3: Recursion!. It's due on Friday, February 5th at the start of class (11:30AM Pacific). This assignment is all about recursion and recursive problem-solving, and by the time you're done you'll have a much better handle on this amazing technique.
This assignment may be done in pairs. Please see our pair programming page for details about working with a partner.
Good luck!
We've just released our next assignment, Assignment 2: Fun With Collections. It's due on Friday, January 29th at the start of class (11:30AM Pacific). This assignment explores container types and their applications, and once you've finished you'll have some really impressive pieces of software to show off and play around with.
Good luck!
The first programming assignment of the quarter, Assignment 1: Welcome to C++!, goes out today. It's due on Friday, January 22nd at the start of class (11:30AM Pacific). This assignment explores general C++ coding, strings, recursion, debugging, and the Stanford libraries. We hope you have fun with this one!
LaIR shifts will begin this Monday at 5PM Pacific. Feel free to stop by for help! We highly recommend reading our handout about debugging strategies for advice about how to debug your programs and how to ask good questions in the LaIR.
Good luck!
Welcome to CS106B! We've got an exciting quarter ahead of us and you're in for a real programming treat. Over the next ten weeks, we'll explore fundamental techniques in modeling and solving problems using a variety of programming techniques and evaluating their tradeoffs. By the time you're done with this class, you'll have a firm grasp of problem-solving techniques and will ready to start applying your skills in areas that you genuinely care about.
In the meantime, feel free to check out the course information handout and syllabus to learn more about what this class is all about, the prerequisites, and the course policies. If you have any questions in the meantime, feel free to email me at htiek@cs.stanford.edu with questions. If you're wondering whether this is the right class for you, check out our handout with course placement information.
See you soon!
Huffman Coding
Second Midterm Logistics
Midterm Logistics
Container Syntax Reference
Python-to-C++ Guide
Assignment Submission Checklist
Debugging Your Code
Honor Code
Course Placement
Course Calendar
Course Information
Section Handout 8
Section Handout 7
Section Handout 6
Section Handout 5
Section Handout 4
Section Handout 3
(Solutions)
Section Handout 2
(Solutions)
Section Handout 1
(Solutions)
Assignment 0: Welcome to CS106B!
Midterm 2 Practice Problems
Midterm 1 Practice Problems
Stanford C++ Library Documentation
C++ Standard Library Documentation
Setting Up Qt Creator
Blank Stanford C++ Project
Blank SimpleTest Project
Assignment Submitter
Working in Pairs
Style Guide
Git Help Session
Git Help Session Slides
27: Where to Go from Here
Slides
| Video
| Q&A
26: Minimum Spanning Trees
Slides
| Video
| Q&A
| Code
25: Graphs
Slides
| Video
| Q&A
24: Beyond Data Structures
Slides
| Video
| Q&A
23: Binary Search Trees, Part II
Slides
| Video
| Q&A
| Code
22: Binary Search Trees, Part I
Slides
| Video
| Q&A
| Code
21: Linked Lists, Part III
Slides
| Video
| Q&A
| Code
20: Linked Lists, Part II
Slides
| Video
| Q&A
| Code
19: Linked Lists, Part I
Slides
| Video
| Q&A
| Code
18: Hashing, Part II
Slides
| Video
| Q&A
17: Hashing, Part I
Slides
| Video
| Q&A
| Code
16: Implementing Abstractions, Part II
Slides
| Video
| Q&A
| Code
15: Implementing Abstractions, Part I
Slides
| Video
| Q&A
| Code
14: Designing Abstractions
Slides
| Video
| Q&A
| Code
13: Searching and Sorting, Part II
Slides
| Video
| Q&A
12: Searching and Sorting, Part I
Slides
| Video
| Q&A
11: Big-O Notation
Slides
| Video 1
| Video 2
| Q&A
10: Recursion, Part V
Slides
| Video
| Q&A
| Code
09: Recursion, Part IV
Slides
| Video
| Q&A
| Code
08: Recursion, Part III
Slides
| Video
| Q&A
| Code
07: Recursion, Part II
Slides
| Video
| Q&A
| Code
06: Recursion, Part I
Slides
| Video
| Q&A
| Code
05: Collections, Part III
Slides
| Video
| Q&A
| Code
04: Collections, Part II
Slides
| Video
| Q&A
| Code
03: Collections, Part I
Slides
| Video
| Code
02: Strings
Slides
| Video
| Q&A
| Code
01: Functions
Slides
| Video
| Q&A
| Code
00: Introduction
Slides
| Video
| Q&A