Dfs Graph Leetcode Problem