Pregunta de entrevista de Extreme Networks

String traversal and the logic behind it