This logic will still work even if the books order was not sorted according to their pages, right?
Book Allocation - Concept
hi @dedeomkar,
the question : “You are given number of pages in n different books and m students. The books are arranged in ascending order of number of pages. Every student is assigned to read some consecutive books. The task is to assign books in such a way that the maximum number of pages assigned to a student is minimum.”
itself says you’ll get ordered array
and here ordering is imp
eg : ar[] = {10, 20, 30, 40, 50, 60} and k = 3 ans is 90
but if u have unsorted array ar[] = {10, 20, 40, 50, 30, 60} then you’ll get 80
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.