Pregunta de entrevista de Principal Financial Group

Basic DSA and puzzle one question for tree