Module 10 · unordered_set and unordered_map: Hashing, Collisions and the Anti-Hash Test
Cheat Sheet: unordered_set and unordered_map on One Page
ProReading
This page is the module on one sheet, for the moment before a contest or an interview. Every line here was taught, measured or run in lessons 01 to 06, and the set and map column in Modules 8 and 9. Nothing is new. Print it, or keep it open beside the editor.
Checking what this lesson needs for you…
What is inside Cheat Sheet: unordered_set and unordered_map on One Page
- Declaring the hash containers
- Every operation and its cost
- How a look finds its bucket
- GCC 12's bucket numbers
- The six idioms
- What a rehash breaks
- Which container, in one table
- The nine traps
Module test
Ten questions on this module. Pass at 70%, and you can take it as many times as you like.
Take the module test