- Insertion sorts
- Exchange sorts
- Selection sorts
- Merge sorts
- Distribution sorts
An easy way to visualize how each sorting algorithm works is to think about how to sort a shuffled deck of cards lying on the table using each method. The cards are to be sorted by suit (clubs, diamonds, hearts, and spades) as well as by rank (2 through ace). You might have seen some of these algorithms in action at your last bridge game.
In an insertion sort, you pick up the cards one at a time, starting with the top card in the pile, and insert them into the correct position in