Pergunta de entrevista da empresa Amazon

Algorithm leet code question (graphs)