Data structures and algorithms
You insert 1,000 keys into a hash table with 1,000 buckets using a uniform hash.
AppliedNumeric answer
You insert 1,000 keys into a hash table with 1,000 buckets using a uniform hash. What is the expected number of colliding pairs of keys?
Answer with a number. Fractions, powers and expressions like 23/6 or C(52,5) are read correctly in practice.
The worked solution is in Premium
The answer, the full working and the one idea to take away – for this and all 1,322 questions in the bank. Answer it in practice and your working is marked, with a known mistake named when you make one.
Report an issue with this question
Learn the method
Of the kind reported at
More data structures and algorithms questions
- When does a hash map lookup degrade to linear time?Applied · Premium
- You implement a queue with two stacks: push onto the inbox, and pop from the…Applied · Premium
- You need the 100 largest values from a stream of 10⁹ numbers you cannot store.Foundation · Free solution
- What does the recurrence T(n) = 2T(n/2)+O(n) solve to?Applied · Free solution
- What most often decides whether a dynamic programming solution is feasible?Applied · Premium
- What does the recurrence T(n) = 4T(n/2)+Θ(n²) solve to?Applied · Premium