← Amazon questions

Hash map with O(1) insert/retrieve and O(n) key lookup

Filed under Amazon

Implement a custom hash map structure supporting O(1) time complexity for insertion and key-based retrieval, along with an O(n) operation to retrieve all keys associated with a specific given value.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.