Maybe You Want to Learn Sorting Algorithms

URL:: https://brilliant.org/courses/computer-science-algorithms/array-algorithms-2/insertion-sort-algo/2/
Author:: brilliant.org
## AI-Generated Summary
You already know one sorting algorithm, selection sort, why learn another?
## Highlights
> Here's an extreme example: imagine you are running a sorting algorithm *by hand* on pencil and paper, performing swaps by erasing and rewriting numbers. Under these conditions, selection sort is almost certainly your best bet: it keeps the number of swaps to a minimum.
> Insertion sort, on the other hand, is often a better choice for computer implementations. The sorting algorithm used by the Java and Python programming languages is based on ideas from insertion sort and another sorting algorithm (mergesort). ([View Highlight](https://read.readwise.io/read/01g9qt03w3h75xcmfjqh97k9xb))