Skip to content

Glossary: Data Structures and Algorithms in JavaScript

Insertion sort

Also written: insertionSort

Sorting like a hand of cards: take each item and slide the bigger ones before it right to drop it into place. It is O(n²) but very fast on nearly sorted data.

Where the book teaches it

Related terms

Merge sortTimsort