Book allocation problem


not able to identify what am i missing in the algorithm

@pradyumn25jain updated your code a little, look at this https://ide.codingblocks.com/s/267553

oh ok got it thanks - i was still updating the value of arr[i]