Problem · Dynamic Programming

Two-Core Process Assignment

Learn this problem
MediumAgodaINTERNOA

Problem 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

More Agoda problems

drafts saved locally
public int[] distributeProcesses(int[] time) {
  // write your code here
}
time[10, 21, 10, 21, 10]
expected[41, 31]
checking account