CSC148H :: Lectures and Reading :: Summer 2013

Overview

The required reading for the course will be posted here. We will also post useful (or fun) but non-required reading: it will be clearly marked.

We often use the chalkboard to teach. We will usually not post summaries of this; please make a friend in class in case you happen to miss a lecture.

Notes will likely not be posted until after the lectures. Also, for some lectures, there will only be code that we develop in class.

Week M--F Readings Notes
1 16 May
2 23 May
3 30 May

Some optional stack practice:

  • Given a fully-parenthesized in-fix arithmetic expression like in expr_eval.py, return a fully-parenthesized post-fix arithmetic expression. For example:
    infix_to_postfix("((2 * 3) / (6 - 2))")
    should return
    "((2 3 *) (6 2 -) /)"
  • Some practice problems (Short answer: 6; Multiple choice: 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 13, 15, 16)

4 6 June
  • Unit testing (Software Carpentry)
  • Exercise: implement a recursive adder function that works in-place (without creating any new lists or using slice notation) Hint: the list you pass along will not be smaller, so you'll have to come up with another way to reduce the problem size.
5 13 June
    6 20 June NOTE: The error we saw in class was due to the fact that our LinkedList's removeFirst method was returning a _Node object while our Queue was expecting the object in its _data field. I can't overstress the importance of a) writing and b) following type contracts ;-)
    8 4 July Paul's glove video
    • W08L07.pdf
    • tests.py - a sample unittest file for running multiple tests.
    • bt.py - the completed BinaryTree class.
    • bst.py - a completed BinarySearchTree class containing the insert, contains, traverse and print_tree methods.
    9 11 July
    • W09L08.pdf
    • bstdel.py - a complete BinarySearchTree class with the delete method. Homework: re-implement delete from scratch with the in-order successor.
    10 18 July
    11 25 July
    12 1 August
    13 8 August