Binary Search (Divide & Conquer)

why in the questions like book allocation we take the minimum as the maximum value of the array and not the minimum value of the array ?

Deciding the upper bound and lower bound for answer varies from question to question.
if the answer for would exist for a lower number , the binary search will automatically detect it.
The thing is that you cannot mistake for the lower bound of the solution.
This is the general approach for binary search solutions. Assign the worst case as upper bound, and best possible scenario as lower bound, and search for the answer.

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.