Skip to content

Glossary: Data Structures and Algorithms in Rust

VecDeque

Also written: double-ended queue, push_back, pop_front

A double-ended queue in std::collections, pronounced "vec-deck", with O(1) adds and removes at both ends. Use push_back and pop_front for a queue instead of Vec::remove(0).

Where the book teaches it

Related terms

QueueFIFO, LIFO