This problem appeared on Amazon's online assessment. You partition a sequence of jobs into exactly consecutive groups, and each group's cost is the maximum difficulty in that group. You minimize the total cost.
The technique is D DP where dp[day][i] represents the minimum cost of scheduling jobs through across a given number of days. You'll practice defining DP states for constrained partitioning problems. This is a recurring Amazon OA pattern: split a sequence into parts and optimize some cost function over the splits.