Search
⌘K

Leetcode 1490. Clone N-ary Tree

Given the root of an N-ary tree, produce a deep copy that recreates every node and its list of children while preserving the original tree structure. This requires traversing all nodes (e.g., DFS/BFS) to build new nodes with the same values and child relationships, handling arbitrary branching and a possible null root.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.