Back to problems

Solve three algorithmic optimization and search problems

Algorithm · Uber · Hard

Problem 1 There are n separate tasks waiting to be handled. Completing task i yields a reward of r_i. Two workers are on duty: the first one can complete at most k1 tasks, and the second one at most k2 tasks. Any task may be handed to at most one worker, and it is acceptable to leave tasks unassigned. Determine the largest total reward that can be earned by splitting the work between the two workers, and return that maximum total. Example 1: Explanation: Give the tasks worth…

Checking your access…