Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Rotating binary trees gives unexpected error

Hi all,

when I try

for d in DyckWords(3):
    print "--------------"        
    t = d.to_binary_tree()
    s = t.left_rotate()
    print ascii_art(t)
    print ascii_art(s)

I get "IndexError: list index out of range".

What am I doing wrong?