Problem · Dynamic Programming
Two-Core Process Assignment
Learn this problemProblem statement
You are given an array time representing the time each process takes. Distribute processes across 2 cores such that the maximum total time on any core is minimized. Return the total time for both cores as an array: [sum_core1, sum_core2].
Function
distributeProcesses(time: int[]) → int[]Examples
Example 1
time = [10, 21, 10, 21, 10]return = [41, 31]o~o