C321 Notes and Homework Problems

1997 Syllabus

HTML version

Red Black Trees

Java demonstration
Source code (ugly - I did this in one day)

Homework Assignments

Homework Number 1 - Minimum Spanning Network
Homework Number 2 - Linked Lists and Stacks
Homework Number 3 - Fewest Bus Stops Problem
Homework Number 4 - MergeSort Using Linked Lists
Homework Number 5 - Faster Minimum Spanning Network
Homework Number 6 - Faster Minimum Spanning Network
Homework Number 7 - All Pairs Shortest Paths

Extra Credit Problems

Extra Credit Number 1 - Hamming's Problem Extended
Solution to Hamming's Problem Extended
Extra Cedit Exam Supplement

C++ to Java

Slides from May 2, 1997 (postscript only - use ghostview to see it)
LaTeX source for the above slides - compile with LaTeX

Example Java Code

Radix Sort using circular queue
QuickSort
Hamming's problem extended
Redundancy Check in a network
Binary Trees, Heaps, and Heapsort
Insurance Company Payroll (no muss, no fuss)
MergeSort using linked lists
A simple, insecure HTTP server for the web

Example C++ code

A string class
A date class
A person class
Input data from a file to an array
Stacks using arrays
Stacks using linked lists
Finding redundancy in a network
Finding redundancy in a network (a better solution)
Finding redundancy in a network: recursive solution
Finding redundancy in a network: using circular queue
Merge two queues
Radix Sort using circular queue
Binary Tree and HeapSort (fixed 11/1/96)
Priority Queue and Doctors' Office Simulation
Priority Queue and Doctors' Office Simulation - Heap-Based Priority Queue
A linked list implementation of MergeSort - only one external pointer needed
Recursion Examples (merge, mult, mergesort, splitlist)
Recursion Example - Minimum Spanning Network, Redundancy Test
Borland C++ 4.5 work-arounds
Bucket Hashing - (non-adjusting table size)
Partial implementation of Union-Find for Minimum Spanning Networks

Special Session

Insurance Company Payroll (11/5/96) : no inheritance
Insurance Company Payroll (11/6/96) : with inheritance
Insurance Company Payroll (11/6/96) : no function pointers

Example C code

Stacks using arrays
Stacks using linked lists
Sorting elements of a nxn array using qsort
Another array sort using qsort - not for the timid