Google interview question

I was asked graph algorithms. Leetcode hard questions