Skip to main content
DevHives

Visit a Tree Level by Level

Loading editor…

3 examples run when you press Run. Submit checks every hidden test too.

Case 1
Input:
[8,3,10,1,6,null,14]
Expected:
[[8],[3,10],[1,6,14]]
Case 2
Input:
[]
Expected:
[]
Case 3
Input:
[2,null,5,null,7,4]
Expected:
[[2],[5],[7],[4]]
Ready

Run checks your code against the 3 examples. Submit checks it against all 123 tests and needs a free account. You can also try ideas in the free JavaScript or Python compiler.