Amazon interview question

LC medium (graph problem LC M).