Balanced trees

Marko Rauhamaa marko at pacujo.net
Wed Mar 19 04:49:33 EDT 2014


Steven D'Aprano <steve+comp.lang.python at pearwood.info>:

> If you are in a position to randomize the data before storing it in
> the tree, an unbalanced binary tree is a solid contender.

Applications that can assume randomly distributed data are exceedingly
rare and even then, you can't easily discount the possibility of
worst-case ordering.

In fact, Dan himself said unbalanced trees performed so badly he
couldn't test them satisfactorily.


Marko



More information about the Python-list mailing list