BOOK ALLOCATION PROBLEM

While solving this problem , why we are taking our start as arr[n-1] ??

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!

so we have to take s=max_element
otherwise binary search can produce even smaller ans and this will lead to wrong ans

search space can also be between 0 to arr[n-1]

let we take the test case as 4 students
and the books are also 4, and the number of pages in books are 10,20,30,40 respectively.
So, what should be the answer???

40 is the ans
because you have to minimize the maximum number of pages that can be assigned to students.

so maximum no of pages assigned to student is 40 here

okay ji , thanks . . . .