Stack
LIFO structure
In computer science, a stack is an abstract data type that follows the Last-In, First-Out (LIFO) principle. Imagine a literal stack of plates: the last plate placed on top is the first one removed. Operations include `push` (adding an element to the top), `pop` (removing the top element), and `peek` or `top` (viewing the top element without removing it). Stacks are commonly used in function calls, expression evaluation, and undo/redo mechanisms.
10 connections Built by Tim Jones