Question d’entretien chez UKG

I was asked to Flatten a binary Tree from its roots.