https://ide.codingblocks.com/#/s/28420
this is the link i got the solution but have a small doubt ,when startPages=0,its giving me wrong answer and when it is set to startPages=max(books[i],startPages),its working but i guess it should even work with startPages=0,if i am wrong please tell me why it will not work