Mental Model
A stack stores items in order, last in first out. Using an array or linked list changes how space and speed behave.
Analogy: Imagine stacking books on a table (array) versus stacking books on a flexible rope with knots (linked list). The table has fixed space, the rope can grow but needs knots to hold books.
Array Stack: [0] 5 [1] 3 [2] 7 [3] null Linked List Stack: 7 -> 3 -> 5 -> null ↑top
