Talk:Sorting algorithms/Quicksort: Difference between revisions

m
Line 35:
 
== Fortran-90 code ... pivot choice can cause it to go O(N^2) ==
If the input numbers havahave a distribution which plots as a symmetric triangle, the first and last elements will be equal and their mean is a bad choice for pivot.
--[[User:mecej4|mecej4]] 12:21, 26 June 2009 (CDT)
 
Note that the problem isn't that it's a bad pivot choice. It's that the comments say it's a good pivot choice. Other examples have bad pivot choices (Java just picks the first element), but the task doesn't require a good pivot choice. --[[User:Mwn3d|Mwn3d]] 17:25, 26 June 2009 (UTC)
Anonymous user