Skip to content

Glossary: Data Structures and Algorithms in Rust

Vec

Also written: vector, Vec<T>

Rust's growable dynamic array, with O(1) index reads and push/pop at the end. insert(0, x) and remove(0) shift items and cost O(n).

Where the book teaches it

Related terms

Dynamic arrayAmortizedShifting