Determin whether the tree is balanced