Hacker News new | ask | show | jobs
by fjfaase 163 days ago
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.