← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Given an n-ary tree, return the level order traversal of the tree's values. (ie., from left to right, level by level).
[1, 100].[1, 100].[1, 10000].0 <= Node.val <= 10000 for each node in the tree.Input: root = [1,null,3,2,4,null,5,6]
Output: [[1],[3,2,4],[5,6]]
Explanation: Given n-ary tree:
1 | 3 2 4 | | | 5 6
Input: root = [1,null,2,3,4,5,null,null,6,7,null,8,null,9,10,null,null,11,null,12,null,13,null,null,14] Output: [[1],[2,3,4,5],[6,7,8,9,10],[11,12,13,14]]
[0, 10^4].10^4 children.NOT_FOUND