Schedule Four Tasks per Processor
Problem statement
Processor i becomes available at processorTime[i] and has four cores. There are exactly four times as many independent tasks as processors. Assign exactly four tasks to each processor; its four tasks run simultaneously when it becomes available.
Return the earliest possible time when every task is finished.
Function
minTime(processorTime: int[], taskTime: int[]) → intExamples
Example 1
processorTime = [8,10]taskTime = [2,2,3,1,8,7,4,5]return = 16Assign the four longest tasks to the processor available at 8; the makespan is 8+8=16.
Constraints
taskTime.length == 4 * processorTime.length.- Times are nonnegative.