Re: [algogeeks] Find the path in two nodes of a binary search tree

2012-01-02 Thread Abhishek Gupta
we might implement it using recursive calls where once found..the node is printed and true is returned and if leaf is reached...false is returnedall the function calls getting true will again print and return true...and false will just return false without printing...this way we can print only

[algogeeks] Find the path in two nodes of a binary search tree

2012-01-02 Thread top coder
Suppose you have a tree. A binary tree (for something like simplicity :p). You are traversing it (using infix, postfix or prefix) to search for a node. You find your required node. You just realized that you need to know the path from this node back to the root node (and/or vice versa). Given the f

[algogeeks] Find the path in two nodes of a binary search tree

2011-01-21 Thread snehal jain
Suppose you have a tree. A binary tree (for something like simplicity :p). You are traversing it (using infix, postfix or prefix) to search for a node. You find your required node. You just realized that you need to know the path from this node back to the root node (and/or vice versa). Given the f