Domanda di colloquio di Winton Group

Binary Trees question on Codility