Skip to content

Glossary: Data Structures and Algorithms in C++

FIFO, LIFO

Also written: FIFO, LIFO, first in, first out, last in, first out

FIFO (first in, first out) is how a queue serves items, like a line at the counter. LIFO (last in, first out) is how a stack works, so the latest change is undone first.

Where the book teaches it

Related terms

QueueStack