Google Interview Question

a medium level leetcode graph problem