Skip to content

Glossary: Data Structures and Algorithms in C++

Insertion sort

A sort that works like sorting a hand of cards: take each item and slide the bigger ones right to make a gap for it. It is O(n²) but fast on nearly sorted lists.

Where the book teaches it

Related terms

Merge sortShifting