which datastructure for fast sorted insert?

sturlamolden sturlamolden at yahoo.no
Sun May 25 22:15:18 EDT 2008


On May 25, 8:02 pm, Rodrigo Lazo <rlazo.... at gmail.com> wrote:

> what about heapq for sorting?

Heap is the data structure to use for 'fast (nearly) sorted inserts'.
But heapq do not support (as far as I know) deletion of duplicates.
But a custom heap class coud do that of course.




More information about the Python-list mailing list