LeetCode 431: Encode N-ary Tree to Binary Tree
Convert an N-ary tree into a binary tree and reconstruct it using the left-child right-sibling representation.
3 notes
Convert an N-ary tree into a binary tree and reconstruct it using the left-child right-sibling representation.
Traverse an N-ary tree level by level using breadth-first search.
Serialize an N-ary tree into a string and reconstruct the same tree using preorder traversal with child counts.