Meta interview question

Some graph problems from leetcode