Google interview question

It was a medium level leetcode graph question