Re: AVL Balancing

2006-11-21 Thread John Machin
[EMAIL PROTECTED] wrote: > Im working on an AVL tree Is this homework? > that consists of balancing the tree everytime > you add an object. That's a peculiar kind of AVL tree. Normally it is *not* necessary to balance the tree every time a node is added -- it's done only if a constraint is brea

Re: AVL Balancing

2006-11-22 Thread scbauer
John Machin wrote: > [EMAIL PROTECTED] wrote: > > Im working on an AVL tree > > Is this homework? Yes, this is homework. > > > that consists of balancing the tree everytime > > you add an object. > > That's a peculiar kind of AVL tree. Normally it is *not* necessary to > balance the tree every ti

Re: AVL Balancing

2006-11-22 Thread scbauer
This is one of the errors that im getting Traceback (most recent call last): File "", line 1, in t.insert(5) File "/Users/stevenbauer/Desktop/AVL.py", line 68, in insert stack.append(current) NameError: global name 'stack' is not defined -- http://mail.python.org/mailman/listinfo/py

Re: AVL Balancing

2006-11-22 Thread bearophileHUGS
scbauer wrote: > This is one of the errors that im getting > Traceback (most recent call last): > File "", line 1, in > t.insert(5) > File "/Users/stevenbauer/Desktop/AVL.py", line 68, in insert > stack.append(current) > NameError: global name 'stack' is not defined def __init__(s

Re: AVL Balancing

2006-11-22 Thread John Machin
scbauer wrote: > John Machin wrote: > > [EMAIL PROTECTED] wrote: > > > Im working on an AVL tree > > > > Is this homework? > Yes, this is homework. It was a rhetorical question :-) > > > > > > that consists of balancing the tree everytime > > > you add an object. > > > > That's a peculiar kind of