Optimal Algorithmic Approach
DFS + HashMap: map acts as both visited set and clone registry.
Core Invariants & Edge Cases
- Use a HashMap<Node, Node> mapping original → clone
- DFS/BFS from the start node, creating clones on first visit
- For each original neighbor, recursively clone and link