Revised January 6, 2012
An introduction to widely used and effective methods of data organization, focusing on data structures, their algorithms, and the performance of these algorithms. Students will learn how the choice of a data structure affects the performance and usability of applications, with examples from Web browsing and searching, computer databases, data analysis, text processing, etc. Specific topics include lists, stacks, queues, sets, maps, priority queues, trees, and graphs, together with general algorithmic techniques such as sorting, searching, and other transformations on data. Students who successfully complete the course will be able to use these tools to design and develop efficient programs for a wide variety of applications.
This course will interest those wishing to understand how choices made in program design can significantly affect performance, and how to make such choices in particular cases. It is a central course for the Computer Science minor and is highly recommended for students in Information Management or similar fields and for those in the Mathematics/Teaching plan.
CS 234 is aimed at students in any discipline. Students in Computer Science plans (including SE and CFM) should take CS 240 instead.
Related courses (see calendar for official details)
Typical Reference(s)
Rance D. Neçaise, Data Structures and Algorithms Using Python, Wiley.
Before starting the course, students will need the ability to do the following.
Note: The course will use the Python language for its programming examples and assignments. The necessary syntax and idiom will be presented at the start of the course, as a review for those who know Python and an explanation for those who don't. Experience in other common imperative languages, such as C or Java, will suffice.
The following gives only a general guide for prospective students and instructors. Exact topics and timings will vary from term to term. Students should consult the materials for their particular section at the start of the term.
Basic concepts 12 hours
(Note: each student should find some parts of this material as
new and some as review. A student's individual background will
determine which material falls into which category.)
The Python language: basic data types, functions, selection,
iteration, recursion, strings, association lists, console I/O and
file I/O. The runtime of an algorithm: worst-case, best-case, and
average-case. Asymptotic analysis and order notation. Definition and
examples of abstract data types. Arrays and linked lists.
Review of Selection Sort and Insertion Sort. Mergesort. Quicksort. Non-comparison-based sorting algorithms (e.g., Bucket Sort, Radix Sort). The worst-case, best-case and average-case complexity of these algorithms. Selecting an appropriate algorithm for a specific application.
Stacks, queues, and priority queues 4 hoursStacks and queues. The Priority Queue ADT and simple implementations. Heaps and Heapsort. Application to problems such as selection.
The Map (or Dictionary) ADT 9 hoursThe Map ADT and simple implementations. Linear search and binary search. Self-organizing lists. Balanced search trees (e.g., 2-3-4 trees). Searching in external memory. Hashing: key-indexed search, simple hash functions, and collision-resolution strategies. Example applications.
Graphs 5 hoursAdjacency list and matrix representations. Depth-first and breadth-first traversals of graphs. Minimum spanning trees as a case study of algorithms and data structures.
Specialized algorithms and data structures 3 hoursA case study in selecting, designing and implementing data types for a real-world problem (e.g., text compression/retrieval, geometric data, etc.)

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