[Python-Dev] Complexity documentation request

Daniel Stutzbach daniel at stutzbachenterprises.com
Thu Mar 13 15:03:00 CET 2008


On Thu, Mar 13, 2008 at 3:16 AM, Dimitrios Apostolou <jimis at gmx.net> wrote:
>  On another note which sorting algorithm is python using? Perhaps we can
>  add this as a footnote. I always thought it was quicksort, with a worst
>  case of O(n^2).

It's a highly optimized variant of mergesort, with some neat ideas to
make the best-case O(n).

I just made the word "Sort" into a hyperlink, pointing to the link
that Duncan Booth pointed out in another response.

-- 
Daniel Stutzbach, Ph.D.                   President, Stutzbach Enterprises LLC


More information about the Python-Dev mailing list