I am not getting the correct answer in book allocation problem

I have used almost same code as the painter problem, painter problem submitted correctly.
given test case is running correctly.

Hello @S19APP-PP0086,

Why have you taken high as maximum value of the vector rather taking the sum of all elements.

Can you explain the logic of your code?

I have taken high as the sum itself, I have used exactly same logic as the painter problem. There are two helper functions to calculate min and max element of BS.

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.