Revised January 6, 2012

CS 234: Data Types and Structures


General Description

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.

Logistics

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)

Predecessors: One of CS 116, 136, 138, 145 taken fall 2010 or earlier, 146; Not open to Computer Science students. The initial topics of CS 234 will overcome the differences between CS 116 and 136/146 and put students on a common footing. Students who have taken introductory computer courses from outside the Math Faculty should consult a CS advisor to determine the adequacy of their preparation.
Successors: CS 338.
Conflicts: CS 240.
Hardware/Software used: Python (Note: students should check materials for their individual term regarding the precise version of Python in use for that term.)

Typical Reference(s)

Rance D. Neçaise, Data Structures and Algorithms Using Python, Wiley.

Required preparation

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.

Learning objectives

By the end of the course, students should have acquired each of the following abilities.

Typical syllabus

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.

Sorting algorithms 3 hours

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 hours

Stacks and queues. The Priority Queue ADT and simple implementations. Heaps and Heapsort. Application to problems such as selection.

The Map (or Dictionary) ADT 9 hours

The 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 hours

Adjacency 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 hours

A case study in selecting, designing and implementing data types for a real-world problem (e.g., text compression/retrieval, geometric data, etc.)


Campaign Waterloo

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


Valid HTML 4.01!Valid CSS! Last modified: Wednesday, 15-Feb-2012 10:28:28 EST


Menu:ShowHide