Book allocation problem


why this code is giving wrong answer

refer this

start will not be 0
it will be equal to greatest element of the array