Sorted dictionary

Daniel Stutzbach daniel at
Thu Jan 21 15:42:26 CET 2010

On Thu, Jan 21, 2010 at 2:27 AM, Raymond Hettinger <python at> wrote:

> Using an underlying list to track sorted items
> means that insertion and deletion take O(n) time.
> That could be reduced to O(log n) time by using
> a blist or skiplist as the underlying structure
> for maintaining a sort.

Indeed.  In fact, blist 1.1 (to be released within a month or so) will
include sorteddict, sortedset, sortedlist, weaksortedset, and weaksortedlist

Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list