Dark Mode
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
You have to finish at least one task every day. The difficulty of a job schedule is the sum of
Given an array of integers jobDifficulty and an integer d. The difficulty of the i-th job is
Return the minimum difficulty of a job schedule. If you cannot find a schedule for the jobs
Example 1:
Input: jobDifficulty = [6,5,4,3,2,1], d = 2 Output: 7 Explanation: First day you can finish
Input: jobDifficulty = [9,9,9], d = 4 Output: -1 Explanation: If you finish a job per day you
Input: jobDifficulty = [1,1,1], d = 3 Output: 3 Explanation: The schedule is one job per day.
Input: jobDifficulty = [7,1,7,1,7,1], d = 3 Output: 15 Example 5:
Input: jobDifficulty = [11,111,22,222,33,333,44,444], d = 6 Output: 843
Constraints:
1 <= jobDifficulty.length <= 300 0 <= jobDifficulty[i] <= 1000 1 <= d <= 10