Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

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.

#ChapterMain topicsSlidesLab
1Algorithm AnalysisCounting operations, Big-O, sequential and binary search49Lab 1 – Timing and counting
2RecursionThe call stack, classic recursive algorithms, recurrences38Lab 2 – Recursion, Genericity in Java
3ListsThe list ADT, array lists, singly, doubly and circular linked lists46Lab 3 – Linked lists
4StacksThe stack ADT, balanced symbols, postfix and infix expressions38Lab 4 – Stacks
5QueuesThe queue ADT, circular arrays, deques, priority queues32Lab 5 – Queues
6TreesTerminology, binary trees, the four traversals35Lab 6 – Binary trees
7Binary Search Trees and Priority QueuesBST operations, binary heaps, heap sort39Lab 7 – Binary search trees, Lab 8 – Heaps and priority queues
8SortingElementary sorts, merge, quick and heap sort, counting and radix sort37Lab 9 – Sorting
9HashingHash functions, chaining, open addressing, rehashing37Lab 10 – Hashing
10GraphsRepresentations, BFS, DFS, topological sort35Lab 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

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.