Course Schedule

Lecture times:
Labs:

Lecture Topics by Week

Week 1 (January 8, 10)

Date
Topic
Reading
January 8
Hello World; working on the command line; ssh; writing programs remotely; the Unix time utility. A brief recap of binary numbers.
Course information sheet and the Command-Line Tutorial
January 10
Introductory C: printf, arithmetic operations, basic types, if/else, for/while, array introduction, #define.
C for Python Programmers

Week 2 (January 14, 15, 17)

January 14
Functions in C. Math.h. Scanf. Compiling with -o.
King: 3.2, 9.1, 9.2 and 9.3
January 15
Pointers. Memory diagrams. Pointers to int, double and char variables. A brief discussion of hexadecimal. Printing pointers with %p.
King: Chapter 11
January 17
Pointers and arrays. Translating between the [ ] and * notations. The -Wall option of gcc.
King: Chapter 12

Week 3 (January 21, 22, 24)

Assignment 1 due on Thursday at noon; Assignment 2 released.
January 21
Structs. Creating structs; manipulating and passing them. Pre and Post Conditions.
King: 16.1, 16.2, 16.3
January 22
Pointers to structs. Malloc, sizeof and free. NULL. The -> notation. Linked lists.
King: 7.1, 17.1, 17.4
January 24
More linked lists. Doubly linked; circular.
King: 17.5

Week 4 (January 28, 29, 31)

January 28
Fprintf and fscanf: reading and writing out our linked lists.
King: 22.3
January 29
Pseudorandom number generation (rand); assert statements
King: 24.1 and p686-687 (Pseudorandom sequence generation functions)
January 31
Pointers to pointers review.
King 17.6

Week 5 (February 4, 5, 7)

Assignment 2 due on Thursday at noon; midterm details released.
February 4
Function pointers.
King 17.7
February 5
Introduction to GDB (the GNU Debugger)
Introduction to gdb
February 7
Stacks and queues. The heap.
The stack and the heap -- this is about C++, but it is all the same as C except for that C++ uses "new" in the place of "malloc".

Week 6 (February 11, 12, 14)

February 11
Introduction to recursion. Towers of Hanoi in-class activity.
An introduction to recursion.
February 12
Recursive mergesort, quicksort, binary search. Quizzery!
King: 9.6 and Quick Sort -- read the first three web pages, i.e. up to "Comparing Quick and Heap Sorts "
February 14
Tail recursion and optimization with gcc.
How GCC optimizes recursion

Reading week

No class!

Week 7 (February 25, 26, 28)

Midterm on the morning of the 28th. Assignment 3 released.
February 25
Binary trees.
Binary trees -- read Section 1 and do problems from Section 2 (note: we'll be using pointers-to-pointers for handling trees)
February 26
Traversing binary trees. Quizzery!
Binary tree traversal: Preorder, Inorder, and Postorder
February 28
Binary search trees; binary expression trees
Binary trees -- make note of the terminology

Week 8 (March 4, 5, 7)

March 4
Binary search trees, continued; command-line arguments
Binary trees -- read the rest of it, especially the stuff on binary search trees
March 5
Quizzery! Command-line arguments; ctype; type conversion
King p682-686 and Command-line parameters
March 7
Guest lecture: Steve Engels, game programming

Week 9 (March 11, 12, 14)

March 10 is the last day to drop. Assignment 3 due on Thursday at noon; Assignment 4 released.
March 11
Heaps; heapify and build-heap
March 12
Quizzery! Inserting and deleting from heaps; heapsort.
Heap Sort
March 14
String manipulation (class time was spent on returning midterm, discussion on assignments)
King 23.6

Week 10 (March 18, 19, 21)

March 18
Hash tables; linear, Rth and quadratic probing; chaining
Hash Tables
March 19
Quizzery! Uses of hashing
An Illustrated Guide to Cryptographic Hashes
March 21
Bucket and Radix sorts
Radix Sort

Week 11 (March 25, 26, 28)

Assignment 4 due on Thursday at noon; Assignment 5 released.
March 25
Introduction to graphs: adjacency matrices and lists; breadth-first and depth-first traversals
Introduction to Graphs (pdf)
March 26
Quizzery! Workbooks on graphs; graph isomorphisms
C/Graphs
March 28
Minimum spanning trees
Graph Algorithms II: Dijkstra, Prim, Kruskal (pdf)

Week 12 (April 1, 2, 4)

April 1
Profiling with gprof, makefiles. Piping (Section 1). Dijkstra's algorithm.
GNU Make and Speed your code with the GNU profiler
April 2
Quizzery! An informal introduction to complexity classes. Map/graph colouring, dominating sets.
NP-Completeness
April 4
Examples of NP-Complete problems and approaches to tackling them.
Introduction to Approximaton Algorithms (PPT)

Week 13 (April 8, 9, 11)

Assignment 5 due on Thursday at noon.
April 8
Guest lecture: Steve Easterbrook on case studies in software engineering from NASA
No reading.
April 9
Last Superquiz! C goodies: Variable argument lists, line/file macros. (Section 2 only: piping)
King 26.1 and 14.3
April 11
Student choice lecture. (Review session at 6pm!)
No reading.

Week 14 (April 15)

April 15
Last class. Teaching evals. Review.
Everything you need to know about pointers in C