Skip to content

Glossary: Data Structures and Algorithms

Push, pop, peek

Also written: push, pop, peek

The three stack operations: push adds an item to the top, pop removes and returns the top item, and peek looks at the top without removing it. All are O(1).

Where the book teaches it

Related terms

Stack