Skip to content

Glossary: Data Structures and Algorithms in Rust

Insertion sort

Sorting like a hand of cards: take each item and shift bigger items right to drop it into the gap. It is O(n²) but fast on nearly sorted lists.

Where the book teaches it

Related terms

Merge sortShifting