Time complexity of vector's element deletion.

Whatever it may be, the thing is that it was the reason i got TLE and was cluelessly frustrated for an hour. I though the entire code is O(N) with deletion being only O(1) complexity…:stuck_out_tongue:

That logic was to be used to solve a practice problem on hackerearth. I went on using vectors but got lots of TLE and hence got confused.