CS140 -- Lecture Notes


If I cover a significant amount of material that is not in the book, I will provide lecture notes for the material, and include it here. I will also try to keep track of what the lecture material is for each day here.

  • Differences between C and C++
  • Pointers
  • I/O using the fields library
  • Basic Algorithm Analysis
  • Linked lists
  • Stacks and queues
  • Data encapsulation
  • Recursion
  • Binary trees: search trees, AVL trees, splay trees
  • Binary trees: writing binary tree code
  • Hashing
  • Heaps


    Reading Assignments/Lecture Notes

    Important: The dates and the assigned readings are tentative until a few days before the actual class so you should make sure you check this site regularly.

    DateTopicBook ReadingsOnline Notes
    8/19 Introduction and C/C++ Differences Kochan: Ch. 2-3, Ch. 10 to pg 218 C++ vs C code comparison
    8/24 C I/O Kochan: 347-370
    1. An updated version of mpg.cpp that uses File I/O and command line arguments
    2. C++ to C migration notes
    8/26 C strings and functions Kochan, Ch. 10 to pg 218 and pp. 470-472
    1. C++ to C migration notes
    2. A sample program involving the different C string commands
    8/31, 9/2, 9/7
    1. Structs and Typedefs
    2. Pointers
    3. Strings Revisited
    • Kochan Ch. 9 and pp 325-327
    • Kochan Ch. 11
    • Kochan pp. 383-388
     
    9/9 Fields Library none Fields
    9/14 Analysis of Algorithms Weiss Chapter 2 Algorithm Analysis
    9/16 Singly Linked Lists Weiss 3.1-3.2.4
    1. singly linked lists
    2. All types of linked lists
    3. median.c
    9/21 Midterm 1    
    9/23 Doubly Linked and Circular Lists Weiss 3.2.5-3.2.8
    1. doubly linked lists
    2. All types of linked lists
    9/28 Unions and Generic Pointers Kochan 375-378
    1. Jim Plank's notes on Unions
    2. Jim Plank's notes on Void *'s
    9/30 Unions and Generic Pointers, cont.    
    10/5 Stacks Weiss 3.3
    1. stacks
    2. Wikipedia's Stacks
    10/7 Fall Break    
    10/12 Queues Weiss 3.4
    1. queues
    2. Wikipedia's Queues
    10/14, 10/19 Recursion Weiss 1.3  
    10/21 Midterm    
    10/26 Intro to trees Weiss 4.1-4.2  
    10/28 Engineering Day    
    11/2 Binary search trees Weiss 4.3, 4.6 binary trees
    11/4 AVL Trees Weiss 4.4 none
    11/9 Splay Trees Weiss 4.5  
    11/11 Function Pointers Kochan p. 273  
    11/16 Hashing and Bit Manipulations
    • Kochan Ch. 12
    • Weiss 5.1-5.3
    Bits
    11/18 Hashing: Open addressing and Rehashing Weiss 5.4-5.5  
    11/23 Heaps Loudon Ch. 10 through pg. 250  
    11/25 Thanksgiving    
    11/30 Catch up day    
    12/6 Final from 2:45-4:45pm Open note, open book