BAC-L0-FOUND-102
Data structures and the cost of operations
Arrays, hash tables, trees: what each structure makes fast and what it makes expensive. The basis of every later argument about chain storage.
- Level
- L0 — Foundation
- Duration
- 3 h
- Track
- Foundation
- Maintainer
- Developer Curriculum Architect
Learning objectives
- 01Compare the cost of lookup, insertion and traversal operations
- 02Choose a structure from the expected access profile
- 03Measure a real cost instead of estimating it
Guided lab
Implement a hash table and a search tree, then benchmark both on the same data set.
Independent lab
Repeat the benchmark on a data set a hundred times larger and explain the gap observed.
Security angle
Deliberate hash-table collision: how attacker-chosen input degrades a service.
Assessment
Benchmark report with a justified choice of structure.
