A Tree class, my $0.02 contribution to the python community.
Paul Rubin
http
Sun Oct 16 17:19:07 EDT 2005
Antoon Pardon <apardon at forel.vub.ac.be> writes:
> The underlying implementation is an AVL balanced binary tree with
> inorder threading.
Dan Bernstein argues for switching from hash tables to crit-bit trees
(a/k/a Patricia trees), because of their guaranteed worst case
performance. He also claims:
"Crit-bit trees are faster than comparison-based structures such
as AVL trees and B-trees. They're also simpler, especially for
variable-length strings."
See:
http://cr.yp.to/critbit.html
See:
http://www.cs.rice.edu/~scrosby/hash/
for some stuff about the dangers of hash tables.
More information about the Python-list
mailing list