3 ms·
I wonder about the global statistics of sorted data... Is the most common number of elements to sort zero? Certainly less than ten? What about the median? Two
by repsilat 2y ago
I wonder about the global statistics of sorted data... Is the most common number of elements to sort zero? Certainly less than ten?
What about the median? Two elements to sort? One? Zero again?
- lblume 2y agoThe question is also for which list lengths the performance matters most. When sorting a few strings (<20), whether the algorithm uses 5 or 7 comparisons would usually not matter too much. So to find the optimal algorithm for a given situation, we would have to compute a weighted average by list length importance on the performances of the algorithm per list length.