Minimum Daily Printing Limit
Updated
Problem statement
You are given an array pages, where pages[i] is the number of pages in chapter i, and an integer days.
Chapters must be printed in order, and a chapter cannot be split across days. Return the minimum daily printing limit needed to finish all chapters within days days.
Function
minimumDailyPrintingLimit(pages: int[], days: int) → intExamples
Example 1
pages = [100,200,300,400]days = 3return = 400A limit of 400 permits the three days [100, 200], [300], and [400]. A smaller limit cannot print the 400-page chapter, so 400 is minimal.
Constraints
1 <= pages.length <= 1051 <= pages[i] <= 1041 <= days <= 105
More Agoda interview questions
- Sort Ones, Twos, and Threes In PlacePHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
- Molecular Weight of a Grouped FormulaONSITE INTERVIEW · Seen Oct 2026
- Climb Stairs with One, Two, or Three StepsONSITE INTERVIEW · Seen Aug 2026
- Rank Transform an ArrayONSITE INTERVIEW · Seen Aug 2026
- Minimum Absolute Difference PairsONSITE INTERVIEW · Seen Jun 2026
- Feasibility of Printing Within Given DaysONSITE INTERVIEW · Seen May 2026
- 3SumONSITE INTERVIEW · Seen May 2026
- Can Place FlowersPHONE SCREEN · Seen Nov 2026
- Reverse Words in a StringPHONE SCREEN · Seen Nov 2026
- Disk Space Window AnalyzerPHONE SCREEN · Seen Sep 2026
Similar questions at other companies
- Capacity to Ship Packages Within DaysMicrosoft · OA · ONSITE INTERVIEWMicrosoft interview questions
- Minimize the Longest Hike Between Rest StopsPinterest · ONSITE INTERVIEWPinterest interview questions
- Minimize Maximum Pilot WorkloadSpotnana · ONSITE INTERVIEWSpotnana interview questions
- Maximize the Minimum Distance Between RobotsAmazon · ONSITE INTERVIEW
- Minimum Processing Speed with Multiple RidersDoorDash · ONSITE INTERVIEWDoorDash interview questions
- Split Array Largest SumBloomberg LP · ONSITE INTERVIEWBloomberg LP interview questions
- Rock JumpingIMC Trading · OAIMC Trading interview questions
- Minimize Maximum Group DifferenceDRW · OADRW interview questions
- Array NullificationQRT · OA
- Minimize the Maximum Pages AllocatedGoogle · PHONE SCREENGoogle interview questions