Glossary: Data Structures and Algorithms in Rust
Push, pop, peek
Also written: push, pop, peek
Push adds an item to the top of a stack, pop removes the top item, and peek looks at it without removing it. All are O(1) on a stack.
Glossary: Data Structures and Algorithms in Rust
Also written: push, pop, peek
Push adds an item to the top of a stack, pop removes the top item, and peek looks at it without removing it. All are O(1) on a stack.