Company: Microsoft_30Aug
Difficulty: medium
Maximum Reward Points Problem Description Two interns at HackerRank are assigned to complete a total of n tasks. Each task can be completed by either intern. The first intern earns reward_1[i] points for finishing the i th task, while the second intern earns reward_2[i] points for the same task. To maximize the total reward points for both interns, determine the highest possible combined reward points if the first intern is required to complete k tasks, and the second intern completes the remaining tasks. Note: The k tasks for the first intern can be any of the n tasks. Example Walkthrough: Consider n = 5 , reward_1 = [5, 4, 3, 2, 1] , reward_2 = [1, 2, 3, 4, 5] and k = 3 . Intern 1 completes 3 tasks, while Intern 2 completes the other 2. To maximize the points, Intern 1 takes the first 3 tasks, and Intern 2 takes the last 2 tasks. The total reward points are 5 + 4 + 3 (from Intern 1) + 4 + 5 (from Intern 2) = 21, which is the maximum possible. So, the answer is 21. Function Descriptio