Young Sheldon is obsessed with non-decreasing sequences. On his birthday he got Nboxes of chocolates as a present. Every th (1 SİSN) box has an integer i written on itand contains A[i] chocolatesSheldon places all the box in order from 1 to N. But he does not like the currentplacement as he is obsessed with non-decreasing sequences, and the chocolates in theboxes do not follow that.He starts performing the following operations on the boxes:• In one operation, he can borrow one chocolate from his friend missy and placesthat chocolate in any of the box or he can take out one chocolate from any of theboxesand give it to his friend missy.Your task is to find the minimum number of operations Sheldon needs to perform tomake the sequence of chocolates in the boxes in non-decreasing order
Answers
Answered by
0
Answer:
hehehehehe बेय I know I am going through a student at I am going back in a noun verb or amoebae have you by chance computer hjjsjdjdjdjdjjdn sbjsjs hey beugesjdhshbsjssnnrbdbbdbdbxhd
Similar questions