Pregunta de entrevista de SPS Commerce

Similar to traversing through a tree