Module 10 · unordered_set and unordered_map: Hashing, Collisions and the Anti-Hash Test
When to Use a Hash Container, a Tree or a Plain Array, and When Not To
Free with an accountReading
Kenji uses unordered_map for everything, even for quiz questions numbered 1 to 1000. Maria keeps a map for her word list, though nobody ever walks it in order. Both programs work. Amara asks each of them one question: what did the job need? This lesson is her answer, with a chart, a flowchart, two measurements and one set of keys built to hurt.
Checking what this lesson needs for you…
What is inside When to Use a Hash Container, a Tree or a Plain Array, and When Not To
- Five questions before you pick
- The comparison chart
- The decision flowchart
- A million keys, measured
- A handful of keys, measured
- When someone else chooses the keys
- When not to use a hash container
- The honest default