Clone an Undirected Graph I was reading an article on Clone an Undirected Graph, It says I have do do bfs and have to keep track of visited/cloned nodes. 

I have another approach- I will initialize an empty adjacency list and then traverse the original adjacency list and copy it. Its time complexity is O(V+E) and I don't have to keep track of anything. 

Is there anything wrong with this approach?
Assume that you are only given a source vertex and not given the whole adjacency list, then this method won't work.