Book Allocation problem: All test cases not passed

I have edited your code… Try to submit it now…