Regarding memory limit exceeded


#1

Deleting array element means setting it to zero for this speciifc question. don’t let any remaining value outside new length be non-zero.


#2

Thanks. It worked. I think this should be mentioned clearly in the question.


#3

No it doesn’t work …submit your answer 2 3 times …once it will show MLE.
Even erasing the rest of vector also shows MLE.
I think this ques has some issue


#4

For C++ users do: A.resize() and it works.
I assume they check the A.size() of the array and if it is not equal to what the function returns, then it reports MLE.