Advanced Topics in Computer Science
Unit 5: Sets, Maps, and Hash Tables
Students learn fast lookup structures for uniqueness, counting, indexing, and key-value associations.
Unit Focus
What this unit is really teaching
The unit develops the ideas behind Java HashSet and HashMap while also showing how collisions and load factor affect performance.
Key Topics
- +Set and map ADTs and when to use each
- +Frequency maps, lookup tables, indexes, and duplicate detection
- +Hash functions, hash codes, equality, and collision handling
- +Separate chaining, open addressing, and load factor intuition
- +HashSet, TreeSet, HashMap, and TreeMap tradeoffs
- +Security and correctness concerns when keys are mutable or poorly hashed
Practice Work
Implementation and analysis tasks
Student task
Build a word-frequency analyzer with maps and sorting by count.
Student task
Implement a simple chained hash table and measure collision behavior.
Need support with Unit 5?
Work through the concepts, code, edge cases, and runtime analysis with 1:1 guidance.
