Domanda di colloquio di UKG

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