Pergunta de entrevista da empresa TEKsystems

How would you solve the following program: From my memory the program was a tree that categorized nodes based off alphabetic order when lead obtained by user.