The eleven core data structures, written to the course standard: prerequisites, observable outcomes, a terminology table, the mechanism worked through by hand, a complete runnable lab, independent practice with hidden answers, and a demonstrable finish line.
This folder is about how each structure works and what it costs. The companion folder 04-patterns is about recognising which structure or technique a problem calls for — several patterns there link back here rather than re-deriving the mechanics.
Every lab in this folder has been run and its output checked against the documented “Expected output”.
The structures
Ordered so each builds on the last: dynamic arrays assume arrays, graph searching uses stacks and queues, heaps assume trees, and tries assume both trees and hash maps.
- Arrays — contiguous memory, O(1) indexing, and why insertion in the middle is O(n)
- Dynamic Arrays — geometric growth, and the amortised argument that makes
appendO(1) - Hash Maps & Hash Sets — hashing, collision resolution, load factor, and when O(1) degrades
- Linked Lists — pointer-based nodes, O(1) splicing, and the cost of losing random access
- Stacks and Queues — LIFO and FIFO, and the problems whose shape each one matches
- Trees — hierarchy, height vs. size, and why an unbalanced BST degenerates to a list
- Tree Traversal — pre-order, in-order, post-order, level-order, and what each one is for
- Heaps & Priority Queues — the heap property, sift-up/sift-down, and O(log n) extreme-value access
- Tries / Prefix Trees — shared prefixes, and trading memory for prefix queries
- Graphs — vertices and edges, adjacency list vs. matrix, and the space/time tradeoff between them
- Union-Find — dynamic connectivity, path compression, and union by rank
Question banks
One bank per lesson: micro-questions with the answers hidden behind toggles, for closed-book recall rather than reading. Method explained in the arrays bank.
- Arrays
- Dynamic Arrays
- Hash Maps & Hash Sets
- Linked Lists
- Stacks and Queues
- Heaps & Priority Queues
- Tries / Prefix Trees
- Union-Find
- Trees — banks for that folder’s lessons
- Graphs — banks for that folder’s lessons
Related
- DSA notes — the parent folder
- 04-patterns — the 15 recurring problem-solving patterns
- 03-algorithms — sorting, searching, and graph algorithms built on these structures
Software engineering
Infrastructure & security
Computer science
Hardware & engineering