balance_binary_tree

visualife.diagrams.balance_binary_tree(root: visualife.diagrams.TreeNode.BTreeNode)

Balances a binary tree

Swaps a left subtree with a right subtree to make a binary tree look nicer :param root: (BTreeNode) - the root of an input tree