Sorted dictionary

Jan Kaliszewski zuo at chopin.edu.pl
Thu Jan 21 19:45:56 CET 2010


Dnia 21-01-2010 o 09:27:52 Raymond Hettinger <python at rcn.com> napisał(a):

> On Jan 20, 5:02 pm, "Jan Kaliszewski" <z... at chopin.edu.pl> wrote:

>> http://code.activestate.com/recipes/576998/

> 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.

Please note that I used funcions from bisect, that use binary search.

Doesn't it take O(log n) time?

*j

-- 
Jan Kaliszewski (zuo) <zuo at chopin.edu.pl>



More information about the Python-list mailing list