clone graph with dfs or bfs