tree is already balanced

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

then result of balancing the tree tree = tree


Comments

Please log in to add comments