@@ -0,0 +1,1055 @@
+/**%0A * Definition for undirected graph.%0A * class UndirectedGraphNode %7B%0A *     int label;%0A *     List%3CUndirectedGraphNode%3E neighbors;%0A *     UndirectedGraphNode(int x) %7B label = x; neighbors = new ArrayList%3CUndirectedGraphNode%3E(); %7D%0A * %7D;%0A */%0Apublic class Solution %7B%0A    public UndirectedGraphNode cloneGraph(UndirectedGraphNode node) %7B%0A        if (node == null) return null;%0A        return cloneGraphRecur(node, %0A                                new HashMap %3CUndirectedGraphNode, UndirectedGraphNode%3E ());%0A    %7D%0A    %0A    private UndirectedGraphNode cloneGraphRecur(UndirectedGraphNode node, Map %3CUndirectedGraphNode, UndirectedGraphNode%3E clonedMap) %7B%0A        if (clonedMap.containsKey(node)) %7B%0A            return clonedMap.get(node);%0A        %7D%0A        %0A        UndirectedGraphNode newGraphNode = new UndirectedGraphNode(node.label);%0A        clonedMap.put(node, newGraphNode);%0A        for(UndirectedGraphNode n: node.neighbors) %7B%0A            newGraphNode.neighbors.add(cloneGraphRecur(n, clonedMap));%0A        %7D%0A        %0A        return newGraphNode;%0A    %7D%0A%7D%0A

Create Clone_graph.java