avl tree
Berthold Höllmann
bhoel at despammed.com
Wed Jun 1 15:53:24 EDT 2005
Zunbeltz Izaola <zunbeltz at gmail.com> writes:
> On Tue, 31 May 2005 22:40:19 +0200, Berthold Höllmann wrote:
>
>> You can grab it from
>>
>> <http://starship.python.net/~bhoel/avl-2.1.0.tar.gz>
>>
>
> Thanks i will play with it. But i have realize that what i need was
> exactly a binary tree. I haven't used tree yet and i don't know if i
> can use the avl instaead an ordinary binary tree.
> I have to construct a tree like this
>
> A
>
> B C
>
> A C A B
>
> B C A B B C A C
>
>
> but i think i can construct a avl using left/right. Am I correct?
The point with AVL trees is, that they are self balancing, If you want
to 'define' the structure of the tree, you have to find another
solution.
Berthold
--
berthold at xn--hllmanns-n4a.de / <http://höllmanns.de/>
bhoel at web.de / <http://starship.python.net/crew/bhoel/>
More information about the Python-list
mailing list