4 ms·
The median-of-median comes at a cost for execution time. Chances are, sorting each five-element chunk is a lot slower than even running a sophisticated random n
by kccqzy 2y ago
The median-of-median comes at a cost for execution time. Chances are, sorting each five-element chunk is a lot slower than even running a sophisticated random number generator.
- Quekid5 2y agoSlowness (lower throughput) is often the tradeoff for more predictable run time.
- forrestthewoods 2y agoDid you read the article? Median-of-median results in fewer comparisons than random.