Boundary of Binary Tree


Pls check out my recursive solution. It does this in one iteration.
https://discuss.leetcode.com/topic/87069/javarecursivesolutionbeats94

@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.

Small typo in "The current node is a root node: In this case, the right child will always be a left boundary node. e.g. relationship between A & C in the above figure."
It should say "The current node is a root node: In this case, the right child will always be a RIGHT boundary node. e.g. relationship between A & C in the above figure."