To study efficient algorithms and data structures in a language-independent setting. To become familiar with a number of standard data structures and algorithm design approaches. To gain additional experience in program design and implementation, and to appreciate the formal analysis of algorithms. This course combines many of the highlights of CS 240 and CS 341, but does not treat topics as thoroughly.
This is a required course for all CS minors. It is intended to be of benefit to those wishing to understand the source of potential improvements and efficiencies in programs.
Prerequisites: One of CS 116, 126/124, 134, 136, 138, 145 taken fall 2010 or earlier, CS 146; Not open to Computer Science students.
Antirequisites: CS 240, 334.
Possible Successors: Most of the third year non-specialist courses.
Used in Course: UNIX, Java.
Assumed Background: Programming in an object-oriented language.
Data Structures and Algorithm Analysis in Java, 2nd ed., by M.A. Weiss, Benjamin/ Cummings Publishing Company, 1995.
Three hours of lecture per week, plus one hour tutorial. Normally available in Fall and Spring.
Review of the analysis of algorithms, order notation and machine models. Top-down design of algorithms and data structures. Review of basic data types including lists, stacks, queues, and binary search trees. Choices of implementations of these primitive data types.
Trees as data types and data structures. The use of trees in several aspects of computing. The abstract data types ordered set and priority queue. Binary search trees and balanced search trees including B-trees. Considerations for use on secondary storage.
The abstract data type unordered set and its implementation through hash tables. Particular attention paid to separate chaining and its efficiency, other approaches also discussed.
Basic graph algorithms including shortest paths and minimum spanning tree. Depth-first search, breadth-first search, and their application to several problems. The use of previously introduced data structures in guaranteeing the efficiency of these methods.
A brief introduction to advanced algorithm design techniques including greedy algorithms, divide and conquer, and dynamic programming.
The notion of NP-completeness and its consequences. The applications of techniques discussed in the course to approximate solutions to NP-complete problems.

David R. Cheriton School of Computer Science
University of Waterloo
Waterloo, Ontario, Canada N2L 3G1
Tel: 519-888-4567 x33293
Fax: 519-885-1208
Contact | Feedback: cs-uops@cs.uwaterloo.ca | David R. Cheriton School of Computer Science | Faculty of Mathematics