Uber | Phone Screen | L5-A role

uber logo
uber
L5-A role
May 16, 20253 reads

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.

Full Experience

There is a stream of numbers incoming. They can come in any order. We have to implement two methods.

  1. incoming(num : int) -> This will ingest the number
  2. getMissingMinSoFar() : -> This will return minimum missing number from the stream

Interview Questions (1)

Q1
Minimum Missing Number in a Stream
Data Structures & Algorithms

Implement two methods for a stream of numbers:

  1. incoming(num : int) -> This will ingest the number
  2. getMissingMinSoFar() : -> This will return minimum missing number from the stream

Example stream.getMissingMinSoFar() -> 0 stream.incoming(0) stream.incoming(1)
stream.getMissingMinSoFar() -> 2

stream.incoming(5) stream.getMissingMinSoFar() -> 2 stream.incoming(2) stream.getMissingMinSoFar() -> 3

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!