sorting values in dict

Chris Gonnerman chris.gonnerman at newcenturycomputers.net
Thu Jun 14 21:58:51 EDT 2001


----- Original Message -----
From: "Courageous" <jkraska1 at san.rr.com>
> I don't know what you really want here. Since others have already
> posted some suggestions, I'll simply observe that when a programmer
> wants "fast look up, ordered entries," a tree structure of some time is
> generally used. The use of the appropriate tree eliminates the need
> to sort the container at any given time, as the tree is kept in order;
you'll
> find an entry in O(log N) time. Look in the Vaults for an implementation.

Or look here:

    http://newcenturycomputers.net/projects/rbtree.html

for a Red/Black "nearly balanced" Binary Tree module.






More information about the Python-list mailing list