We are given a binary search tree; we need to find out its border.
So, if the binary tree is
10
/ \
50 150
/ \ / \
25 75 200 20
/ \ / / \
15 35 120 155 250
It should print out 50 25 15 35 120 155 250 20 150 10.
If the binary tree is
10
/ \
50 150
/ \ /
25 75 200
...