Skip to content

Glossary: Data Structures and Algorithms in Rust

Stack

Also written: stacks

A last-in, first-out pile where items are added and removed at the top only. It can be built as a generic `Stack<T>` on top of a `Vec`, and is used for things like undo and bracket checking.

Where the book teaches it

Related terms

FIFO, LIFOPush, pop, peekCall stack