Click here to see the full article post
The first algorithm will not work for [1, null, 2, 3, 4] as this algorithm will include 2 element in both left traversal as well as right traversal. Or I am missing something?
Pls check out my recursive solution. It does this in one iteration.
Please explain why the output of this test case:
is [1,2,3,5,6] not [1,2,3,5,6,4]?
 is not on the right boundary?
@tyuan73 root node doesn't have a right child, then according to the definition of right boundary only root node will be considered in right node. Hence 4 should not be there.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.