Pergunta de entrevista da empresa GE HealthCare

To do a tree data structure hard question only in javascript.