Given an array where each element is the time a bus takes to complete one trip, and a target total number of trips, return the minimum amount of time required for all buses together to complete at least that many trips. Buses operate independently and in parallel. Input: '[time], totalTrips'.
Input: '[time], totalTrips'.
Output: Integer — the minimum total time.
Input: [1,2,3], 5
Output: 3
Explanation: In 3 units: 3+1+1 = 5 trips.Input: [2], 1
Output: 2
Explanation: One bus, one trip.Input: [1,1,1], 3
Output: 1
Explanation: Three buses, one unit each.1<=n<=10^51<=time<=10^71<=totalTrips<=10^7