Delete Mid of a Stack
Delete Mid of a Stack sits in a tiny editor. Dev’s job is undo typing. Write that first.
Do Delete Mid of a Stack once by hand. push / pop LIFO. Change one input. Say the new result out loud.
Without Delete Mid of a Stack, a tiny editor gets messy and undo typing is hard to trust.
Dev ships Delete Mid of a Stack in a tiny editor. That is the use case worth saying.
Delete Mid of a Stack trap — pop on empty. Dev loses marks for that every viva.
After Delete Mid of a Stack, Dev should still remember pop on empty.
Viva for Delete Mid of a Stack — what it is → push / pop LIFO → the mistake (pop on empty).
| 3 | ← top (pop)
| 2 |
| 1 |
LIFOFor Delete Mid of a Stack: definition + a tiny editor + one failure.