Skip to content

Glossary: Data Structures and Algorithms in C++

Stack

Also written: stacks, std::stack

A last-in, first-out pile where you add and remove at the top only. It suits undo and bracket matching, and std::stack's pop() returns nothing.

Where the book teaches it

Related terms

Call stackFIFO, LIFOPush, pop, peek