AgodaOA #3
Two-Core Process Assignment
Estimated MediumStatement and editorial — judging is being prepared
Topics (AI-labelled)Tree & Game DP
You are given an array time of process durations. Same dual-core / latch-toggle rules as problem 1: the latch holder decides whether each next process goes to themselves (latch flips) or to the other core (latch stays). Each core plays optimally to maximize its own total time. Return [S1, S2], the totals assigned to core 1 and core 2.
Example 1
Input:
time = [10, 21, 10, 21, 10]
Output:
[41, 31]
Explanation: Optimal alternating assignment under the latch game yields S1 = 41 and S2 = 31.
Editorial
Loading solution…