Domanda di colloquio di Amazon

Write a program that balances an unbalanced binary tree.