Large Dictionaries

Iain King iainking at gmail.com
Mon Jun 5 10:28:40 EDT 2006


Lawrence D'Oliveiro wrote:
> In article <447af556$1 at nntp0.pdx.net>,
>  Scott David Daniels <scott.daniels at acm.org> wrote:
>
> >For example, time timsort (Python's internal sort) on pre-sorted
> >data; you'll find it is handled faster than random data.
>
> But isn't that how a reasonable sorting algorithm should behave? Less
> work to do if the data is already sorted?

An already sorted list can be pathological for Quicksort, depending on
how you code it.

Iain




More information about the Python-list mailing list