Loading problem…
You're building a file system explorer that needs to list all files and folders accessible from a root directory.
Given the root of an N-ary tree, return all reachable node values in level-order (BFS).
Level-order means:
node.children> Note: A DFS traversal can reach all nodes, but it will produce a different order for many test cases.