Skip to content

Glossary: Data Structures and Algorithms in Java

push, pop, peek

Also written: push, pop

The stack operations: add to the top, remove the top item, and look at the top without removing it. All are O(1).

Where the book teaches it

Related terms

stackoffer, poll, peek