Search
⌘K

Leetcode 706. Design HashMap

Implement a HashMap for integer keys/values without using built-in hash table libraries that supports put, get, and remove operations. The core challenge is to design a hashing and collision-resolution strategy (e.g., chaining or open addressing) to achieve expected O(1) time per operation given keys/values ≤ 10^6 and up to 10^4 calls.

Asked at:

Meta


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Mid January, 2025

Meta

Mid-level

Asked during phone screen. Implement a MagicMap class that has the following functions: put, get, putAll You can use builtin dictionaries. Can you implement all functions in O(1) time?

Your account is free and you can post anonymously if you choose.