Problem
Given an n-ary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).
Example
We should return its level order traversal:
1 | [ |
Solution
Method: Breadth-first Search
Time Complexity:
Space Complexity:
1 | """ |