Pergunta de entrevista da empresa SPS Commerce

Similar to traversing through a tree