3 ms·
The thing is, you do not always want to find a median of a set of integers -- not even most of the time. Frequently you want to find a median of floats, or use
by xyzzyz 16y ago
The thing is, you do not always want to find a median of a set of integers -- not even most of the time. Frequently you want to find a median of floats, or use a custom ordering. Real life is not so simple.
- gorset 16y agoFloats doesn't complicate radix sort that much. To quote McIlroy et al. (1993) "the troubles with radix sort are in implementation, not in conception". Finding the median strikes me as more of a academic problem than a real life problem. However, partial sort (for which finding the median is a sub problem) is an easy optimization relevant for search engines, where you sometimes only need to extract the hits from position 1000-2000.