Hash Map With Separate Chaining
Asked at Goldman Sachs · Coding Questions · Difficulty: Medium · Last asked Nov 21, 2024
Hash maps give average `O(1)` insert, lookup and delete, but only while keys spread evenly over the buckets. When two different keys land in the same bucket, that is a hash collision, and the map has to keep both keys apart. In this question you build a small hash map that resolves collisions by separate chaining and grows itself before the chains get long.
Loading the problem…
More Goldman Sachs interview questions
- Merge K Sorted Lists (including K=3)
- Goldman Hirevue Behavioral Bank (6 Questions)
- Goldman Sachs HireVue Behavioral and Recursion
- Probability and Statistics Drill: Eight Numeric Problems
- Explain Recursion to a Non-CS Audience
- Implement a Deque From Scratch