Sorted dictionary

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


On Thu, Jan 21, 2010 at 2:27 AM, Raymond Hettinger <python at rcn.com> 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
types.

--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100121/0e3bcf8f/attachment.html>


More information about the Python-list mailing list