Algorithm · Two Sigma · Hard
An employer has 2n workers and two tasks, task A and task B. The workers must be split into two groups of exactly n workers each: one group handles task A, and the other group handles task B. Every worker must be assigned to exactly one task. For worker i, time[i][0] is the number of hours needed if the worker is assigned to task A, and time[i][1] is the number of hours needed if assigned to task B. The value of n is time.length / 2. Return the minimum possible sum of hours…
Checking your access…