Question d’entretien chez UBS

Write a pseudo code to balance a bindary tree.