Mental Model
A stack is a collection where you add and remove items from the top only. You can build it using a linked list or an array, each with its own strengths and weaknesses.
Analogy: Think of a stack like a stack of plates. Using an array is like having a fixed-size tray where plates are stacked, while a linked list is like stacking plates one by one without a fixed tray size.
Array Stack: [0] -> Plate1 [1] -> Plate2 [2] -> Plate3 Top ↑ at index 2 Linked List Stack: Plate3 -> Plate2 -> Plate1 -> null Top ↑ at Plate3