4 ms·
That argument cannot be generalized to every use-case. In fact it's very specific to quick sort. Yes, this approach may not work for a lot of situations, but t
by czardoz 9y ago
That argument cannot be generalized to every use-case. In fact it's very specific to quick sort.
Yes, this approach may not work for a lot of situations, but there are some (as pointed out elsewhere in the comments), where it's perfectly reasonable, even desirable to improve the average runtime at the cost of the worst case.