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 and I/O using the fields library
  • Data encapsulation
  • Linked lists
  • Stacks and queues
  • Basic Algorithm Analysis
  • 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/20 Introduction and C/C++ Differences Kochan: Ch. 2-3, Ch. 10 to pg 218 C++ vs C code comparison
    8/25 C I/O Kochan: 347-362 An updated version of mpg.cpp that uses File I/O and command line arguments
    8/27
    1. C strings
    2. C I/O
    Kochan, Ch. 10 to pg 218 and pp. 347-362 C++ to C migration notes
    9/1, 9/3
    1. Structs and Typedefs
    2. Pointers
    • Kochan Ch. 9 and pp 325-327
    • Kochan Ch. 11
    • Kochan pp. 383-388
    • Loudon pp. 11-17
     
    9/8 C strings and string functions Kochan: pp. 470-472  
    9/10 File I/O Kochan: pg. 362-370  
    9/15 Fields Library none Fields
    9/17 Analysis of Algorithms Loudon Chapter 4 Algorithm Analysis
    9/22 Singly Linked Lists Loudon Ch. 5 through pg. 68
    1. singly linked lists
    2. All types of linked lists
    9/24 Doubly Linked and Circular Lists Loudon Ch. 5 starting at pg. 68
    1. doubly linked lists
    2. All types of linked lists
    9/29 Unions and Generic Pointers
    • Kochan 375-378
    • Loudon 21-23
    1. Jim Plank's notes on Unions
    2. Jim Plank's notes on Void *'s
    10/1 Midterm    
    10/3 Unions and Generic Pointers, cont.    
    10/6 Stacks Loudon Ch. 6 through pg. 105
    1. stacks
    2. Wikipedia's Stacks
    10/8 Queues Loudon Ch. 6 starting at pg. 105
    1. queues
    2. Wikipedia's Queues
    10/13 To Be Announced    
    10/15 Fall Break    
    10/20 Intro to trees and binary search trees Loudon Ch 9 binary trees
    10/22 AVL Trees Loudon Ch 9 AVL applet
    10/27 Midterm    
    10/29 Engineering Day    
    11/3 Function Pointers
    • Loudon p. 23
    • Kochan p. 273
     
    11/5 Hashing and Bit Manipulations
    • Kochan Ch. 12
    • Loudon Ch. 8 through pg. 161
    Bits
    11/10 Hashing: Open addressing Loudon Ch. 8 from pg. 161  
    11/12, 11/17 Recursion
    • Loudon, Ch. 3
    • Loudon, Quicksort 307-317
     
    11/19 Heaps Loudon Ch. 10 through pg. 250  
    11/21 Priority Queues Loudon Ch. 10 from pg. 250  
    11/26 Thanksgiving    
    12/1 Catch up day    
    12/8 Final Exam, 8-10am Open Note, Open Book