To complete before meeting
- ✅ Double-check that you have access to our CS106M Ed forum (and while there, say 👋 on the intro thread!)
- ✅ Write your own implementation of binary search and test cases to confirm it works correctly.
- Bring your completed code and test cases to the meeting for show and tell.
Read full Ed post for more detail on above tasks.
Further resources
If after finishing the code, you have some extra time and unsated curiosity, here is some additional reading to peruse. The two book chapters can be accessed from the Stanford Library digital collection (click the link below, authenticate with your Stanford sunet, and find link to full book in section labeled "Available online").
- Jon Bentley, "Writing Correct Programs", Column 4 of Programming Pearls
- Tim Bray, On the Goodness of Binary Search
- Albert Savoia, "Beautiful Tests", Chapter 7 of Beautiful Code
- Josh Block, Nearly All Binary Searches are Broken
- How does a "pro" write it? Check out these versions from standard libraries