Skip to main content
DevHives

Boundary of a Binary Tree

Loading editor…

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

Case 1
Input:
[10,6,15,null,8,12,20,7,9,null,null,18]
Expected:
[10,6,8,7,9,12,18,20,15]
Case 2
Input:
[1,null,2,3,4]
Expected:
[1,3,4,2]
Case 3
Input:
[42]
Expected:
[42]
Ready

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