Minimum Time To Solve The Problems
Given 'N' subjects, each containing a certain number of problems, and 'K' friends, assign subjects to friends such that each subject goes to exactly one friend, maintaining contiguity in assignment, aiming to minimize the maximum number of problems any single friend receives. Each problem takes 1 unit of time to solve. Determine the minimum possible time required for the most loaded friend.
Example:
Input:
N = 4
K = 2
subjects = {50, 100, 300, 400}
Output:
400
Explanation:
The optimal assignment of subjects is {50, 100, 300} for the first friend and {400} for the second friend. The maximum time any friend takes in this setup is 400, which is minimal.
Constraints:
1 <= T <= 10
1 <= N, K <= 10^4
1 <= subjects[i] <= 10^9
- Time limit: 1 second
Assign subjects to friends to minimize maximum workload, find minimum time for most loaded friend.
Assign subjects contiguously to minimize maximum workload
Determine the minimum possible time required ...read more
Top SPRINKLR Production Analyst interview questions & answers
Popular interview questions of Production Analyst
Top HR questions asked in SPRINKLR Production Analyst
Reviews
Interviews
Salaries
Users/Month