Thanks Gene
On 25 November 2011 04:28, Gene wrote:
> Perhaps the simplest way is to do a normal inorder traversal and, as
> you visit nodes, keep track of the last one visited in an external
> (global or class) variable. When you visit a new node and the last
> node has a NULL right child point
Perhaps the simplest way is to do a normal inorder traversal and, as
you visit nodes, keep track of the last one visited in an external
(global or class) variable. When you visit a new node and the last
node has a NULL right child pointer, you can update it with the new
node. If the new node has a