BairesDev interview question

Algorithms Proficiency Test create a tree