define func(node) as return the clone node of current node. In the func, do two things: check if current node has clone node, if not, clone a new node copy the edge, if the corresponding node has not new node, handle such new node. Finally
define func(node) as return the clone node of current node. In the func, do two things:
- check if current node has clone node, if not, clone a new node
- copy the edge, if the corresponding node has not new node, handle such new node. Finally push clone neighbors to vector
Error:
N/A