efficient idiomatic queue?
David Eppstein
eppstein at ics.uci.edu
Tue Jan 15 19:48:47 EST 2002
In article <mailman.1011135408.6568.python-list at python.org>,
"Tim Peters" <tim.one at home.com> wrote:
> > is probably going to create way too many generator/iterator instances to
> > scale well.
>
> Well, it was clear from the start that there's no interest in a practical
> algorithm here, else we'd just use a temp array and a handful of index
> variables.
I think heap sort would be a good choice for practicality, since it sorts
in-place with only a handful of index variables. But except for unusual
circumstances, I would likely just call Python's built-in sort().
--
David Eppstein UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/
More information about the Python-list
mailing list