One more doubt, why did s start at 40 and not 10?
Start of array of books
you have to minimize the maximum number of pages that can be assigned to students.
if no of student is = to n(no of books) then each student read one book
and the maximum number of pages that can be assigned to students is through the book which has max pages means arr[n-1]
which is in this case is 40.
Moreover, The minimum possible answer cannot be less than maximum of given pages,
let n=5 and pages are 10,40,20,30 then answer cannot be less than 40,as atleast one of the students will be assigned that 40 page unit!
OK! Understood! Thanks!
Great! If this solves your doubt please mark it as resolved