main resources links contact

Recitation 05: Debugging and Linear Search

Debugging

Before we get to debugging, remember that a little extra work up front can save you a lot of time and frustration in the long run. Test and debug incrementally. So, after you write a function, test it to make sure everything works as expected. It'll be a lot easier to find that bug in foo() than later when the bug happens once bar() calls foo().

For these examples, some notes can be found in a comment at the top of the file.

Linear Search

If you have any comments or see any errors, please let me know.