here in the monotonic space why is the start = arr[n-1] ,
it should be 0 .
Doubt somewhere in the monotonic space?
In this question you have to minimise the maximum number of pages read by a student. Start is taken as ar[n-1] because book at (n-1)th index with ar[n-1] pages must be allocated to some student. So there must a student who read atleast ar[n-1] pages. So our ans is always greater than or equal to ar[n-1].
you can start with 0 as well but your ans would also be greater than ar[n-1].
why it is that the ans will be >=arr[n-1]
@mehulbhandari358
If you allocate books in any order, there must be a student who receive (n-1)th book. So he must read atleast arr[n-1] pages . thus your ans can never be less than arr[n-1] since there is always 1 student who read a[n-1] pages. Your start can be 0 but ans will always be greater than arr[n-1].
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.