Mental Model
A stack stores items in order, last in first out. It can be built using a linked list or an array, each with different strengths and limits.
Analogy: Think of a stack like a stack of plates. Using an array is like having a fixed-size tray where plates fit exactly. Using a linked list is like stacking plates freely without a tray size limit but with more overhead to keep track of each plate.
Array Stack: [0] 1 [1] 2 [2] 3 ↑top [3] null Linked List Stack: 3 -> 2 -> 1 -> null ↑top
