Mental Model
A stack is like a pile where you add and remove items only from the top. Using an array means we keep track of the top position and add or remove items there.
Analogy: Imagine a stack of plates. You can only put a new plate on top or take the top plate off. The array is like a shelf with numbered spots, and the top tells you where the last plate is.
Array: [ _ , _ , _ , _ , _ ] Top index: -1 (empty stack) Visual: [0] [1] [2] [3] [4] _ _ _ _ _ Top -> -1 (no plates)
