Book allocation prblem

Whats wrong in my code. Please point out.

Hi,

I have made some changes in your code.
Actuallly you have written condition for student becoming more than k in if part but it should be in else part.
Link:

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.

Hi, may I know what is the issue that you are facing?