News for hackers. Stuff that matters.
Re:Big-O Algorithm Complexity Cheat Sheet by amalcon on Saturday May 04, 2013 @03:23PM (#5656021)
If one takes the time to select optimal pivots it becomes O(nlogn). The selection is free from a big-O perspective, because it's O(n) immediately before the O(n) list division step.

Of course, nobody does this, because the selection is not really free. The constant factor cost of choosing the optimal pivot hurts the average case, making the modified quicksort tend to do worse than heapsort or introsort.

There are no comments on this comment yet.