An Uber phone-screen report describes a data-structure exercise for recording ID visits and retrieving the earliest ID seen exactly once. The task includes a defined result when no eligible ID remains and permits keeping the data in memory, with IDs ranging to roughly one million.
The follow-up asks how to make queries constant time. The reported hint involves removing repeated IDs from the front of a queue and discussing amortized performance. The account focuses on requirements and optimization rather than the candidate’s implementation or interactions with the interviewer. It does not state whether the applicant passed the screen or received a later hiring decision.
Discussion
Loading comments…