wrong answer but working for the sample input
Book Allocation Problem
Plz send your code by saving on ide so that I could check it.
I have edited your code madhur, your both functions were correct, only there were very little changes that need to be made, try to submit the code now,