Problem 1490 · Medium

Clone N-ary Tree

Deep-copy an ordered N-ary tree, allocating new nodes that keep every value and the exact order of children.

Open the interactive visualisation