Skip to content

Glossary: Data Structures and Algorithms in Rust

Shifting

Also written: shift

Moving items along a list to open or close a gap. Inserting or removing at the front of a Vec shifts every item, which costs O(n).

Where the book teaches it

Related terms

Dynamic arrayInsertion sort