What is the problem in the code?


passes 1 given test case but for larges test cases, it gives garbage values.

@rohitkandpal683 There is just silly problem in line 108
You are scanning the deleteing elements till n instead of m
Correct it will work fine.

Please rate my answere you feedback will be conunted.

i corrected n with m but it does not give correect answer. i think that there is some more problem in returing values

@rohitkandpal683 I can see your submissions you didnt updated it.
it is still n replace it with m

https://ide.codingblocks.com/s/226631 i also commented on line 108 please check

Yes @rohitkandpal683 , Now submit it

i submit this same code 3-4 times .can you see my submisiion

@rohitkandpal683 you are deleteing the element in the wrong the order delete the element first which is scanned first