Stack
Data StructuresA last-in, first-out (LIFO) collection.
A stack is a data structure where elements are added (pushed) and removed (popped) from the same end, so the most recently added item is removed first. Stacks model function call frames, undo histories, and expression evaluation.