Uber | Maximum drivers online

2165
Feb 08, 2019
Aug 08, 2019

Give you an extra long list. Each element of the list is an array. For example: [[1, 5], [10, 16], [2, 7],..... [1000, 1027]]

The first number of arrays represents the driver's starting time and the second number is the arrival time for passengers. Question: Given the starting and ending time for online drivers from this input array, find the time interval where there is maximum drivers online. For example, the answer could be [16, 801]

Comments (5)