Uber Phone Interview Ride Scheduling

Anonymous User
884
Jul 09, 2022

I got this question for my phone interview which is leetcode hard level based on my opinion.

UberX Scheduling Problem

1 2 3 4 5 6 --->
UberX RideRequest: [Source, Dest]: Example [1,100]

Input: [[s1,d1],[s2,d2]..]
Example: [[1,100],[50,200]]

Output:?
How do we group these rides to be taken by least number of drivers?

After that question there is a follow up

What if we have max driver capacity for each car to be 3 so a car can take 3 person in trip. How would you group them?

'''
Max Driver capacity: 3
[[1,100],[50,100],[90,300],[120, 200]]
'''

Comments (4)