Ask HN: Favorite Sorting Algorithm?

3 points by akashwadhwani35 ↗ HN
Bubble Sort.

Terrible in practice, but probably the first algorithm that made me understand what “sorting” actually means.

I respect it for that.

4 comments

[ 2.7 ms ] story [ 20.0 ms ] thread
There are some simple ways to improve bubble sort. The first is to move in two directions. The second is to first start comparing elements at a large distance than one and reduce the distance on how often element needed to be swapped.