There are 3 methods:
1. simply in order tranverse and get the ascending array, every next element is the successor of previous element.
2. It is Hawstein's method: There are 2 conditions:
1st: have right child, go find the left least grand child.
2nd don't. go up to find the closest ancestor.
Here is whole code:
In order to verify, need to be careful, it is based on BST. So every simulation should have a BST structure. Random Tree will fail in this method.