Minimum Time to Complete Trips
Medium · Binary Search · about 15 minutes
Asked at Amazon, Google, Microsoft.
time[i] is how long bus i takes per trip; buses run independently and back-to-back. Return the minimum time needed for all buses together to complete at least totalTrips trips.