Concept Flow - Allocate Minimum Pages Binary Search on Answer
Set low = max(pages array)
Set high = sum(pages array)
While low <= high
mid = (low+high)/2
Check if allocation possible with mid
If possible
Yes→Update answer = mid
high = mid - 1
low = mid + 1
Return answer
We use binary search on the range of possible maximum pages to allocate, checking feasibility each time, narrowing down to the minimum maximum pages.
