Giving wrong answer for test case 2


Plz see where i went wrong??

@Vishu_1801 Lemme review it buddy!

@Vishu_1801 check ya code for this test case, you will get it:
input : 5
30 40 35 45 42

Your output : -1 2 1 2 1 END
Actual :- 1 2 1 4 1 END