Given a stack, delete the middle element of the stack without using any additional data structure. If stack size is even assume mid is (size-1)/2
{
"stack": [
1,
2,
3,
4,
5
]
}[
1,
2,
4,
5
]{
"stack": [
1,
2,
3,
4
]
}[
1,
3,
4
]{
"stack": [
10,
20,
30,
40,
50,
60
]
}[
10,
20,
40,
50,
60
]Sign in to Run Code and Submit