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 with a number.
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 fixed spots, and the top number tells you where the last plate is.
Array: [ _ , _ , _ , _ , _ ] Top index: -1 (empty stack)
