Task Completion
Problem Overview
- Assign n tasks between two interns to maximize total reward, with intern 1 completing exactly k tasks.
- Input: k, reward_1[0..n-1], reward_2[0..n-1]; Output: maximum combined reward points (int).
- Constraints: 1 ≤ n ≤ 1e5, 0 ≤ k ≤ n, rewards in [1, 1e4].
- Real-world context: task allocation and scoring for a two-person team at HackerRank.
- This coding interview problem is a Mathworks interview question.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
