COMPUTER SCIENCE 261
COMPUTER SCIENCE II
I. Introduction
A. Catalog Description
This course is a continuation of the topics introduced in CSci161.
It provides an introduction to the study of fundamental data
structures and their associated algorithms. One of the goals of this
course is to teach students how to choose the appropriate data
structures and algorithms for a paticular problem. Topics include
lists, stacks, queues, trees, sorting, searching, abstract data
types, and object- oriented programming using C++.
I will try and include a sizable program in the course this term,
and also hope (no promises!) to include material on OpenGL.
Prerequisites: CSCI 161 together with MATH 121 or 258; or
permission of the instructor. Satisfies the Mathematical Reasoning
core requirement.
B. Objectives
- Introduce data structures and their associated algorithms.
- Introduction to proofs of program correctness.
- Continue the development of good programming style, including
object- oriented methods.
- Introduce further methods of program design (including data
abstraction, information hiding, modular programming, and
object-oriented programming), debugging, and testing.
- Introduce algorithmic analysis.
- Have students work on a large programming project.
C. Prerequisites
- Computer Science 161 together with Math 121, or 258. A grade
of C- is required in the prerequisite courses.
II. Required Topics
A. Program Design
- Top-down implementation, testing and debugging techniques;
Stub procedures and drive programs.
B. Simple Data Structures
- Data abstraction. Basic implementation techniques and
algorithms associated with stacks, queues, linked lists, and
binary trees.
C. Arrays, Searching and Sorting
- 2-dimensional matrices: accessing slices and at least one
operation, such as multiplication.
- Unsorted lists: Insertion, deletion, and linear search
- Sorted lists: Insertion, deletion, linear search, and binary
search
- Sorting: Mergesort, one O(n^2) algorithm, and one O(n log n)
algorithm
D. Linked Lists
- Pointer representations
- Traversal, insertion, deletion and search operations
- Doubly-linked list representation and operations
- Empty header element for doubly-linked lists
E. Queues and Stacks
- Array and linked list implementations
- Insertion and deletion operations
F. Trees
- Pointer representations of a binary tree
- Binary search trees
- Recursive binary tree traversals: inorder, preorder, and
postorder
G. Programming Tools
- Separate compilations
- Debugger
H. Analysis of Algorithms
- Fundamentals of algorithm analysis, asymptotic behavior and
space vs. time tradeoffs.
I. Program Verification
- . Loop invariants, mathematical induction, preconditions and
postconditions.
J. Recursion
- Recursive data structures and algorithms. When to use
recursion and when not to.
III. Optional Topics
A. Strings
- Static and dynamic representations
- Concatenate, empty, length, and search operations
B. Graphs
- Adjacency matrix representation
- One traversal or similar algorithms
C. Hash Tables
- Two hash functions
- Linear and chaining collision-resolution policies
IV. Bibliography
- Joseph Bergin Data Abstraction: The Object-Oriented
Approach Using C++
- D. Gries, The Science of Programming
- E. Knuth, The Art of Computer Programming, Vols. I, II,
III
- N. Wirth, Algorithms + Data Structures = Programs
- (video) Sorting Out Sorting
Return to
Course
Home Page.