Introduction to Computer Science      COMP 250       Winter 2011
Instructor: Professor Michael Langer
Lectures MWF  4:35-5:25 pm       ENGTR 100
Instructor Availability: MW 5:25 pm (after class) or by appointment


Announcements
Resources
Teaching Assistants

A1,  A3
  Mathieu Rousseau [email]
  Irene Pylypenko [email]  
  Anton Dubrau [email]  
A2,  A4
  Jonathan Cottrell [email]
  Faiyaz Zamal [email]   [www]
  Juan Camilo Gamboa Higuera [email]


LECTURE SCHEDULE AND NOTES READINGS, EXERCISES, ASSIGNMENTS, EXAMS
Preliminaries  (Jan. 5-10)
  1. introductions (slides)
  2. grade school algorithms (addition and multiplication)  (notes)   (slides)
  3. binary number representations  (notes)   (slides)
  4. memory addressing,   arrays,  insertion sort (notes)   (slides)

Reading:   Java Background (covered in COMP 202)

Exercises 1: number representations (PDF)
Linear Data Structures (Jan. 12- 24)
  1. singly linked lists  (notes)   (slides)   (code)  
  2. doubly linked lists  (notes)   (slides)   (code)  
  3. Java: ArrayList vs. LinkedList (notes)   (slides)  
  4. stacks (notes)   (slides)  
  5. queues (notes)   (slides)

Assignment 1   (PDF)   (code)   (solutions) mean 84/100

Exercises 2: linear data structures (PDF)

Recursion  (Jan. 26 - Feb. 2) 
  1. mathematical induction (notes)   (slides)
  2. fibonacci, Tower of Hanoi (notes)   (slides)
  3. decimal to binary, power, binary search (notes)   (slides)
  4. mergesort (notes)   (slides)

Exercises 3: recursion (PDF)

Quiz 1 with solutions (mean 8.3/10)
Analysis of Algorithms  (Feb. 4-14 )
  1. big O (notes)   (slides)
  2. not big O vs. big Omega (&Omega) (notes)   (slides)
  3. recurrences: factorial, Tower of Hanoi, binary search (notes)   (slides)
  4.     ... matrix power, Fibonnaci, mergesort, multiplication (notes)   (slides)

Exercises 4: big O (PDF)
big O tutorial
Exercises 5: recurrences (PDF)

Assignment 2   (PDF)   (code)
A2 Q1 solutions (mean: 43/50)
A2 Q2 solutions (mean: 37/50)
Non-linear Data Structures (Feb. 16- March 25)    
  1. trees (notes)   (slides)
  2. tree traversal (notes)   (slides)
  3.    STUDY BREAK (Feb. 21-25)
  4. binary trees, expression trees (notes)   (slides)
  5. binary search trees 1 (notes)   (slides)
  6. class was cancelled on Friday March 4
  7. binary search trees 2 (notes)   (slides)   (code)
  8. Java break: interfaces (notes)   (slides)
  9. priority queues, heaps (notes)   (slides)
  10. heaps 2 (notes)   (slides)
  11. heaps 3 (notes)   (slides)
  12. maps (notes)   (slides)
  13. hashing (notes)   (slides)
[graphs covered after OOD]
  1. graphs (notes)   (slides)
  2. graph traversal (notes)   (slides)
  3. garbage collection, Google's pagerank [NOT ON FINAL EXAM] (slides)



Exercises 6: trees and heaps (PDF)

Quiz 2 with solutions (mean 14/20)

Exercises 7: hashing (PDF)

Exercises 8: graphs (PDF)
Object Oriented Design in Java  (March 25 to April 1 )
  1. inheritance (notes)   (slides) (modified Apr. 1)
  2. inheritance (cont.), polymorphism (notes)   (slides)   (Dog code)
  3. abstract classes, casting (notes)   (slides)
  4. modifiers (notes)   (slides)

Exercises 9: object oriented design (PDF)
+   more OOD exercises   (from "Introduction to Java
    programming", 4th edition?, by D. Liang, Ch. 10)