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.
Glossary: Data Structures and Algorithms in Rust
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.