CS 2311 – Data Structures
Course map¶
One row per chapter: the slides, then the lab that goes with them. This is the page to bookmark.
| # | Chapter | Main topics | Slides | Lab |
|---|---|---|---|---|
| 1 | Algorithm Analysis | Counting operations, Big-O, sequential and binary search | 49 | Lab 1 – Timing and counting |
| 2 | Recursion | The call stack, classic recursive algorithms, recurrences | 38 | Lab 2 – Recursion, Genericity in Java |
| 3 | Lists | The list ADT, array lists, singly, doubly and circular linked lists | 46 | Lab 3 – Linked lists |
| 4 | Stacks | The stack ADT, balanced symbols, postfix and infix expressions | 38 | Lab 4 – Stacks |
| 5 | Queues | The queue ADT, circular arrays, deques, priority queues | 32 | Lab 5 – Queues |
| 6 | Trees | Terminology, binary trees, the four traversals | 35 | Lab 6 – Binary trees |
| 7 | Binary Search Trees and Priority Queues | BST operations, binary heaps, heap sort | 39 | Lab 7 – Binary search trees, Lab 8 – Heaps and priority queues |
| 8 | Sorting | Elementary sorts, merge, quick and heap sort, counting and radix sort | 37 | Lab 9 – Sorting |
| 9 | Hashing | Hash functions, chaining, open addressing, rehashing | 37 | Lab 10 – Hashing |
| 10 | Graphs | Representations, BFS, DFS, topological sort | 35 | Lab 11 – Graphs |
How the slides are organised¶
Every chapter has a slide deck you can read on the page, present full screen, or download. Each deck covers the structure itself (its operations, Java implementation and cost) and ends with a problem-solving section: worked problems showing when to choose that structure and how it turns a slow solution into a fast one. Every deck finishes with practice exercises and their answers.
How the labs are organised¶
In the first part of each lab you implement the data structure yourself; in the last
part, Use the JDK, you solve problems with the matching class of the Java library (ArrayList,
ArrayDeque, PriorityQueue, TreeMap, HashMap, …), so you know which one to choose
and how to use it. Solutions are in collapsible boxes, and every task has its expected
output so you can check your work. The PDF download of a lab page leaves the solutions
out, so it can be printed as a handout.
Course description¶
This course aims to introduce basic data structures and performance measurement of algorithms which are to be used as tools in designing solutions to problems. Topics include: methods of analysis of algorithms including asymptotic notations and empirical measurements of performance, pointers and recursion, abstract data type concepts, different data structures including concepts, implementation and operations for maintaining them; such data structures are: lists and linked-lists, stacks, queues, priority queues, trees and its traversal, binary search trees, heaps, hash tables and graphs and graphs’ algorithms. Also, important sorting and searching algorithms will be discussed including: bubble sort, insertion sort, selection sort, merge sort, heap sort and radix sort, sequential search and binary search.
Course requirements¶
Pre-requisite: CS2301 – Computer Programming 2
Credit Hours: 4 CHs
Contact Hours: (3 hours lecture, 2 hours Lab)
Textbooks¶
Title: “Data Structures and Abstractions with Java”
Author: Frank M. Carrano
Publisher: Pearson 2015
Year/Edition: 2015
Further reading: M. A. Weiss, “Data Structures and Algorithm Analysis in Java”, Pearson 2014.