A stack is a data structure which is a special kind of list in which elements may be added to or removed from the top only. These actions are called a push or a pop, respectively. Actions may be taken by popping one or more values, operating on them, and then pushing the result back onto the stack.

Stacks are used as the basis for computer languages such as FORTH, PostScript® (Adobe Systems), and the RPN language used in Hewlett-Packard® programmable calculators.

Another notion of the term stack is the algebraic geometry stack of Grothendieck.

See also

Algebraic Geometry Stack, List, Pop, Push, Queue, Reverse Polish Notation, Stack of Groupoids

Explore with Wolfram|Alpha

Cite this as:

Weisstein, Eric W. "Stack." From MathWorld--A Wolfram Web Resource.

Subject classifications