Question d’entretien chez Amazon

Write a program that balances an unbalanced binary tree.