Given a stack, delete the middle element of it without using any additional data structure.
{ "stack": [ 1, 2, 3, 4, 5 ] }
[ 1, 2, 4, 5 ]
{ "stack": [ 1, 2, 3, 4 ] }
[ 1, 2, 4 ]
{ "stack": [ 1 ] }
[]
Sign in to Run Code and Submit