You want to schedule a list of jobs in d days. Jobs are dependent so you have to finish all jobs from index 0 to i before working on job i+1. Each day you must work on at least one job. The difficulty of a day is the maximum difficulty of a job done that day. Return the minimum sum of difficulties of each day.
30:00
Java
Minimum Difficulty of a Job Schedule
hard
Topics
Companies
You want to schedule a list of jobs in d days. Jobs are dependent so you have to finish all jobs from index 0 to i before working on job i+1. Each day you must work on at least one job. The difficulty of a day is the maximum difficulty of a job done that day. Return the minimum sum of difficulties of each day.
Example 1:
Input: {"jobDifficulty":[6,5,4,3,2,1],"d":2}
Output: 7
Constraints:
1≤jobDifficulty.length≤300
0≤jobDifficulty[i]≤1000
1≤d≤10
Input
arr ={"jobDifficulty":[6,5,4,3,2,1],"d":2}
6 jobs [6, 5, 4, 3, 2, 1] over 2 days. A day costs its hardest job.