CSCI2520: Data structures
Data-structure notes.
Use the sidebar to move chapter by chapter, or jump directly into a section below.
Course contents
CSCI2520: Data structures
Data-structure notes.
Chapter 0
Programming foundations
Language and memory tools used throughout the data-structure notes.
0.1 Pointers, memory, and structs
Review the C language tools that the course uses to explain data-structure behavior: pointers, malloc, typedef, and struct layout.
Chapter 1
ADT and operation semantics
From ADT contracts to stack/queue behavior and dictionary-style hashing operations.
1.1 ADT operations: stack, queue, and function pointers
Build a precise ADT view of stacks, queues, and function-pointer-based operation dispatch in C data-structure implementations.
1.2 Hash tables and collision strategies
Use dictionary operations, hash functions, collisions, and chaining to understand why hash tables trade ordered structure for fast average-case access.
Chapter 2
Lists and recursion
Recursive list contracts, head-tail reasoning, and representation-aware operation cost.
2.1 Lists as recursive ADTs
Read lists as recursive head-tail ADTs, then compare iterative and recursive operation implementations.
Chapter 3
Complexity and sorting
Asymptotic growth, cost comparison, and sorting-oriented complexity reasoning.
3.1 Complexity growth and algorithmic cost
Interpret asymptotic growth and compare algorithmic costs before implementing sorting or selection routines.
3.2 Selection, quickselect, and linear-time sorting
Separate selection from full sorting, then use quickselect, counting sort, and radix sort to understand when extra structure improves complexity.
Chapter 4
Trees and BSTs
Binary tree traversal, reconstruction, and binary-search-tree operations.
4.1 Binary trees and BST operations
Use traversal order, reconstruction, and BST invariants to reason about binary tree algorithms.
Chapter 5
Graphs and priority queues
Graph traversals, spanning trees, shortest paths, topological sorting, heaps, and Huffman coding.
5.1 Graph traversal, spanning trees, and shortest paths
Compare graph representations, DFS, BFS, spanning-tree algorithms, and shortest-path reasoning.
5.2 Topological sort, heaps, and Huffman coding
Study DAG ordering, heap priority queues, Huffman coding, and sorted-list merging as structural greedy algorithms.