CSCI2520
Data structures
Programming foundations, abstract data types with stacks, queues and hashing, lists and recursion, complexity and sorting, trees and binary search trees, graphs, and heaps with greedy coding.
Your progress
0/ 28 sections marked complete
Next section: 0.1 Pointers, memory, and structs
Completion marks are saved in this browser.
This course in the web
In the CSCI2520 notes
- Theorem cards
- 54
- Definitions
- 58
- Counterexamples
- 24
- Concept lenses
- 14
- Histories of ideas
- 4
- Proof X-rays
- 25
Sections with a history of an idea
- Complexity growth and algorithmic cost3.1
- Minimum spanning trees: Prim and Kruskal5.2
- Shortest paths and Dijkstra's algorithm5.3
- Huffman coding and heap applications6.2
None of these is on the timeline yet.
No concept lens from this course is recorded in the web yet.
Counts cover the 28 public sections of this course and what is written in them, not recorded connections. 0 of these sections are indexed into the web in detail so far.
In the webTheorem cards 54 · Definitions 58 · Counterexamples 24 · Concept lenses 14 · Histories of ideas 4 · Proof X-rays 25
None of these is on the timeline yet.
No concept lens from this course is recorded in the web yet.
Counts cover the 28 public sections of this course and what is written in them, not recorded connections. 0 of these sections are indexed into the web in detail so far.
Chapter 0 · 1 section
Programming foundations
Language and memory tools used throughout the data-structure notes.
Theorems 2 · Definitions 3Counterexamples 1Lenses 1
Chapter outline →See this chapter on the web →Not yet indexed in the web
- 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 · 2 sections
ADT and operation semantics
From ADT contracts to stack/queue behavior and dictionary-style hashing operations.
Theorems 3 · Definitions 11Counterexamples 1Lenses 1Proof X-rays 1
Chapter outline →See this chapter on the web →Not yet indexed in the web
- 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 · 6 sections
Lists and recursion
Recursive list contracts, head-tail reasoning, and representation-aware operation cost.
Theorems 7 · Definitions 5Counterexamples 5Lenses 2Proof X-rays 4
Chapter outline →See this chapter on the web →Not yet indexed in the web
- 2.1
Lists as recursive ADTs
Read lists as recursive head-tail ADTs, then compare iterative and recursive operation implementations.
- 2.2
Reversing a singly linked list
Prove iterative list reversal using a loop invariant and explicit pointer and ownership assumptions.
- 2.3
Reverse a list segment
Reverse a segment in place and preserve its predecessor and suffix.
- 2.3a
Short midterm-style practice
Two worked list exercises; the actual exam boundary is unverified.
- 2.3b
Short final-style practice
Two worked exercises on segment reversal and validation; the actual exam boundary is unverified.
- 2.4
Recurrences from recursive code
Derive time and stack bounds from recursive code by counting the work each call does, covering halving, merge sort and overlapping subproblems.
Chapter 3 · 4 sections
Complexity and sorting
Asymptotic growth, cost comparison, and sorting-oriented complexity reasoning.
Theorems 7 · Definitions 10Counterexamples 3Lenses 3History 1Proof X-rays 5
Chapter outline →See this chapter on the web →Not yet indexed in the web
- 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.
- 3.3
Elementary sorting: insertion sort and selection sort
Prove insertion sort and selection sort correct with loop invariants, count comparisons and moves exactly, relate insertion sort to inversions, and compare stability.
- 3.4
Quicksort and heapsort
Analyze quicksort with partition invariants, worst-case and expected cost, and heapsort with in-place sift-down, then compare both with merge sort.
Chapter 4 · 3 sections
Trees and BSTs
Binary tree traversal, reconstruction, and binary-search-tree operations.
Theorems 9 · Definitions 7Counterexamples 2Lenses 1Proof X-rays 3
Chapter outline →See this chapter on the web →Not yet indexed in the web
- 4.1
Binary tree traversal and reconstruction
Read recursive binary-tree structure through preorder, inorder, and postorder traversal, then reconstruct trees from sufficient traversal information.
- 4.2
Binary search trees and core operations
Maintain the binary-search-tree ordering invariant through search, extrema, insertion, successor, and deletion operations, with costs measured by tree height.
- 4.3
Null-marked preorder and open slots
Encode, decode and validate ordered binary trees using null-marked preorder.
Chapter 5 · 10 sections
Graphs
Graph representations and traversals, minimum spanning trees, shortest paths, and topological ordering.
Theorems 19 · Definitions 15Counterexamples 10Lenses 5History 2Proof X-rays 10
Chapter outline →See this chapter on the web →Not yet indexed in the web
- 5.1
Graph representations, DFS, and BFS
Compare adjacency matrices and lists, then trace DFS and BFS while maintaining correct frontier and visited-state invariants.
- 5.1a
Counting shortest paths with BFS
Count shortest paths by distance layers, preserving the FIFO and exact-arithmetic invariants.
- 5.2
Minimum spanning trees: Prim and Kruskal
Construct minimum spanning trees with Prim's and Kruskal's greedy choices while distinguishing the MST objective from shortest paths.
- 5.2a
Stopped Kruskal and minimum forests with k components
Prove the stopped Kruskal algorithm for fixed component count, including ties and negative weights.
- 5.3
Shortest paths and Dijkstra's algorithm
Use relaxation and settled-vertex reasoning to compute single-source shortest paths with Dijkstra's algorithm under nonnegative edge weights.
- 5.3a
Dijkstra: heap snapshots and predecessors
Trace snapshot heaps, prove settlement and reconstruct a route.
- 5.3b
Midterm supplement: weighted routes
Two worked questions on tracing weighted routes and a negative edge.
- 5.3c
Final supplement: ties and stopping
Two worked questions on equal distances, early stopping and predecessors.
- 5.4
Topological sorting of DAGs
Order the vertices of a DAG with Kahn's indegree process and DFS finishing times, using both methods to expose directed cycles.
- 5.5
Path counting and longest paths in a DAG
Compute path counts and maximum weights in topological order, including unreachable vertices.
Chapter 6 · 2 sections
Heaps and greedy coding
Binary heaps, priority queues, Huffman coding, and heap-based multiway merging.
Theorems 7 · Definitions 7Counterexamples 2Lenses 1History 1Proof X-rays 2
Chapter outline →See this chapter on the web →Not yet indexed in the web
- 6.1
Binary heaps and priority queues
Represent a complete binary tree in an array and maintain min-heap order through priority-queue operations and bottom-up construction.
- 6.2
Huffman coding and heap applications
Build a prefix-free Huffman code by repeated minimum-frequency merges, then reuse the heap abstraction for efficient multiway merging.