Hashing Quiz
Editorial
13 questions across the three Hashing lessons: which structure a task needs, what a lookup costs and when it doesn't, what makes a good key, and what a small bug does. Pick an answer to see whether it's right and why. Nothing is saved, so you can take it again.
If one trips you up, its lesson is Introduction to Hash Tables, Frequency Counting with Hash Maps or Grouping and Matching with Hash Maps.
Quiz
1 / 13Multiple choice
Does any value appear twice in an unsorted array? What should you keep as you go?
Multiple choice
Two Sum on an unsorted array: return the two indexes. What should you keep as you go?
Multiple choice
Is one word of lowercase letters an anagram of another? What should you count with?
Multiple choice
Which of 1 to n are missing from n values in [1, n], with no extra space? What do you use?
Multiple choice
A C++ unordered_map with 62,233 buckets is given 50,000 keys that are all multiples of 62,233. What happens?
Multiple choice
Two Sum stores each number before asking for its partner. What does it return for [4, 3, 4] with target 8?
Multiple choice
Java: two map values, both 1000, compared with ==. The result?
Multiple choice
In Python, what is Counter("aab") - Counter("aabb") == Counter()?
Multiple choice
Index marking with nums[i] = -nums[i] instead of -abs(nums[i]). What does it return for [2, 2]?
Multiple choice
Which key puts egg and add in one group, and keeps foo with them but not cat?
Multiple choice
Isomorphic Strings with only a map from s to t: which pair does it get wrong?
Multiple choice
Why can't any hash key group words that differ by one letter?
Multiple choice
Number of Matching Subsequences: why take a letter's waiting list out before refilling it?