Minimum Weekly Input (Planning Campaingns :)
Problem Overview
- Partition the ordered campaign costs into the given weeks to minimize the sum of weekly inputs (max cost per week).
- Inputs: costs array and weeks; Output: minimum total weekly input; preserve order and assign at least one campaign each week.
- Constraints: 1<=n<=300, 1<=weeks<=n, 1<=costs[i]<=1e5.
- Real-world context: planning weekly marketing budgets for campaigns.
- From Amazon interviews; a coding interview problem and 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:
