Stack Pointer
Stack Pointer is simple if you keep it on paper. Amit uses it for undo typing in a tiny editor.
Stack Pointer on the board — push / pop LIFO. Then say what undo typing looks like after.
Without Stack Pointer, a tiny editor gets messy and undo typing is hard to trust.
Use Stack Pointer when undo typing must stay clear. If a simpler DSA step works, use that instead.
Stack Pointer trap — pop on empty. Amit loses marks for that every viva.
Stack Pointer is not a lonely heading. Amit ties it to undo typing.
Viva for Stack Pointer — what it is → push / pop LIFO → the mistake (pop on empty).
| 3 | ← top (pop)
| 2 |
| 1 |
LIFOFor Stack Pointer: definition + a tiny editor + one failure.