LeetCode: https://leetcode.com/problems/clone-graph/
Given a reference of a node in a connected undirected graph, return a deep copy (clone) of the graph.
cur
[2,4]
0
[1,3]
1
[2,4]
2
[1,3]
3
copies={}
Step 1 / 7
Step 1:
Represent the graph as an adjacency list and start DFS from node 1.
Pointers: cur=0
Focus: select @ [0]