Tech & SaaS
Senior
programming
LeetCode #133 - Clone Graph: 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 (int) and a list (List[Node]) of its neighbors. Test the implementation with the following example: Input: 1 -- 2 -- 3, Output: A deep copy of the graph.
Suggested Answer