Re:Why is quicksort better than other sorting algorithms in ...
by klipt on Monday January 20, 2020 @12:45PM
(#22100571)
In a way, quick sort, radix sort and merge sort are all just recursive versions of bucket sort :-)
* Merge sort: sort within buckets, then between buckets
* Quick sort: sort between buckets, then within buckets.
* Radix sort: can be either depending on whether you sort by most or least significant radix first.
Humans can handle dividing into more than 2 at each stage though, so sorting 100 things with 10 piles of 10 tends to be easier than 7 binary divisions.
You can adapt what you're doing by how the buckets look (huge bucket? do another layer of bucketing in there. Small bucket? Just sort it) and it's easy to see progress and you can "discard" buckets as you go (put them in one output pile as they're done).