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:
Anduril
Canva
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late June, 2026
Canva
Senior
Implement a video cache WITHOUT using Java's built-in hashmap. You are given an interface with add and get. Key and value are both String. You can use String.hashcode(), must handle hash collisions, must add tests.
Early April, 2026
Anduril
Senior
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?
Hello Interview Premium
Your account is free and you can post anonymously if you choose.