← Back

πŸ“š Scholar Allocation Quest

Allocate Books - Minimize Maximum Pages

Books

-

Students

-

Max Pages

-

Best Answer

?

Steps

0
Binary Search on Maximum Pages per Student
Range: [-, -] | Testing: -
Checking...
πŸ“– Library Books πŸ“–
Generate books to allocate to students!

πŸ“– Allocate Books

Problem: Allocate N books to M students (contiguously) minimizing max pages any student reads.

Binary Search: Range is [max(pages), sum(pages)]

Feasibility: Given limit P, greedily assign books until sum exceeds P, then new student.

Time: O(N Γ— log(sum))