Concept Flow - Allocate Minimum Pages Binary Search on Answer
Set low = max(pages array)
Set high = sum(pages array)
While low <= high
mid = Math.floor((low+high)/2)
Check if mid can allocate
high = mid - 1
low = mid + 1
Return low as minimum pages allocation
We use binary search on the range of possible page allocations, checking feasibility each time, narrowing down to the minimum maximum pages per student.