Pregunta de entrevista de Niantic

n-ary tree question (data structures and algorithms)