(This question is a variation of the LeetCode question 875. Koko Eating Banana. If you haven't completed that question yet, it is recommended to solve it first.)
A student is preparing for a test for a scholarship.
The student is required to completely read n chapters (which is the length of the pages array) for the test, where the chapter has pages[i] number of pages. The chapters are read in increasing order of the index. Each day, the student can either read till the end of a chapter or at most x pages, whichever is minimum. The number of pages remaining to read decreases by x in the latter case.
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected