Memory Limit Exceeded problem


#1

Anyone getting Memory Limit Exceeded even with editorial solution?


#2

I am also getting memory limit exceeded error even though I am using O(n) approach and no extra space. Can someone help ?


#3

I have written same code as in complete solution.
still getting the error