Given a reference of a node in a connected undirected graph, return a deep copy (clone) of the graph. Each node in the graph contains a value and a list of its neighbors. The graph is represented using an adjacency list, and you must return the copy of the given node as a reference to the cloned graph.
Click Run to execute sample tests.