LeetCode
Experience
·
May 2019
·
Los Angeles
Uber | Phone screen | Map with getRandom API
42 upvotes
6,325 views
7 replies
Interview Experience
Design a map that supports all following operations in average O(1) time: class RandomMap { void put(int key, int value); Integer get(int key); Integer getRandom(); // this should return a random value with equal...
Full Details
🔒
Unlock full leaked content
Full insider details, leaked discussions, and candidate experiences.
Get Premium →Topics
Hash Table
Arrays
System Design
Probability Stats