Uber | Phone Screen | L5-A role
- Posted
- 16 May 2025
Summary
I had a phone screen interview with Uber for an L5-A role. The interview involved a data structures and algorithms problem where I had to implement methods to ingest numbers into a stream and find the minimum missing number so far.
How it went
There is a stream of numbers incoming. They can come in any order. We have to implement two methods.
- incoming(num : int) -> This will ingest the number
- getMissingMinSoFar() : -> This will return minimum missing number from the stream
Questions asked (1)
- 01
Minimum Missing Number in a Stream
Data Structures & Algorithms
Implement two methods for a stream of numbers:
- incoming(num : int) -> This will ingest the number
- getMissingMinSoFar() : -> This will return minimum missing number from the stream
Example stream.getMissingMinSoFar() -> 0 stream.incoming(0) stream.incoming(1)
stream.getMissingMinSoFar() -> 2stream.incoming(5) stream.getMissingMinSoFar() -> 2 stream.incoming(2) stream.getMissingMinSoFar() -> 3