Pergunta de entrevista da empresa Amazon

graphs problem could not able to solve