Pergunta de entrevista da empresa Microsoft

Pretty standard graph question testing recursion