Company: Atlassian_24july
Difficulty: medium
Get Process Time Problem Description A dual-core processor has to assign n processes, one at a time and in the given order, to its two cores. Process i takes time[i] units of processing time. A latch decides who assigns each process. Initially core 1 holds the latch. When core c holds the latch and process i is the next one to be assigned, exactly one of the following happens: Process i is assigned to core c itself, and the latch passes to the other core . Process i is assigned to the other core, and core c keeps the latch . Each core wants the total processing time of the processes assigned to it to be as large as possible, and whichever core holds the latch makes each decision to maximise its own final total, knowing that the other core will do the same with every decision it makes. When both cores play optimally, find the total processing time assigned to core 1 and the total processing time assigned to core 2. Function Description Complete the function getProcessTime . getProcessTi