Dnia 21-01-2010 o 09:27:52 Raymond Hettinger <pyt...@rcn.com> napisał(a):
On Jan 20, 5:02 pm, "Jan Kaliszewski" <z...@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) <z...@chopin.edu.pl> -- http://mail.python.org/mailman/listinfo/python-list