Minimum Daily Printing Limit
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.