Microsoft interview question

Leetcode Medium problem was there on graph algorithm.