Pregunta de entrevista de Microsoft

Leetcode Medium problem was there on graph algorithm.