Pregunta de entrevista de IBM

Question on Trees and Graphs