algorithms - Why isn't Radix Sort used more often? - Programmers Stack Exchange
Unlike radix sort, quicksort is universal, while radix sort is only useful for fix length integer keys.
Also you have to understand, that O(f(n)) really means in order of K*f(n), where K is some arbitrary constant. For radix sort this K happens to be quite big (at least order of number of bits in the integers sorted), on the other hand quicksort has one of the lowest K among all sorting algorithms and average complexity of n*log(n). Thus in real life scenario quicksort will be very often faster than radix sort.
Read full article from algorithms - Why isn't Radix Sort used more often? - Programmers Stack Exchange
No comments:
Post a Comment