Read the pages | Binary Seach

How is this problem different than “Book Allocation” problem? Seems like they’re same but one test case isn’t passing with the logic same as Book Allocation problem. What changes needs to be done in the Validation function?

1 Like

The problem is exactly same. Share your code link.
You may try out the the lower and upper limit for binary search as

s = max pages in any 1 book
e = sum of all pages in given array of books
This could be a potential error.

https://hack.codingblocks.com/submission/719745
Bhaiya I also took s= max of no of pages in the books and e=sum of pages of all books.