tree left right is taller
if the following are true:
- find root index in tree = ri
- the element at index ri of stack tree = node (rvalue, left, right)
- Height of a tree tree and index left > (Height of a tree tree and index right) + 1
- the element at index left of stack tree = node (lvalue, lleft, lright)
- Height of a tree tree and index lleft < Height of a tree tree and index lright
then result of balancing the tree tree = result of rotating (result of rotating tree twice) clockwise
Comments
Please log in to add comments