Uber interview Experience
Summary
I appeared in an Uber interview recently and was asked a coding question in the first round, which I solved but failed some test cases, leading to rejection.
Full Experience
I appeared in uber interview recently and was asked below quastion in the first round.
There are n cars on x axis. i-th Car's initial position is denoted by location[i] and maximum speed by speed[i]. cars can travel in both directions(left and right). At the end, all cars need to meet at the same location, what would be the minimum time required at which all cars can meet.
Test case cars : 3 position: [1, 3, 7] speed: [2, 1, 1]
Answer: 2 if these cars meet at 5. each car will take 2 units of time.
I solved this problem but few test cases didn't pass, so got rejected. All the best to you guys.
Interview Questions (1)
There are n cars on x axis. i-th Car's initial position is denoted by location[i] and maximum speed by speed[i]. cars can travel in both directions(left and right). At the end, all cars need to meet at the same location, what would be the minimum time required at which all cars can meet.
Test case cars : 3 position: [1, 3, 7] speed: [2, 1, 1]
Answer: 2 if these cars meet at 5. each car will take 2 units of time.