Book allocation

if we can choose book randomly, ((the array was not sorted )) ,how can we solve it?
Dynamic programming?

hello @mzk1994

we can use both binary search as well as dp.
the dp state should look like -->
dp[i][j] -> minimum value of the maximum number of pages to distribute j books among first i students

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.