Recursively store parent and child pointers of the to-be-inserted tree using post-order traversal,and when processing each node during traversal reassign pointers to the other tree using BST insertion. Inorder may not work due to distortion of parent pointers?
On Sun, Oct 9, 2011 at 3:38 AM, Vandana Bachani <[email protected]>wrote: > Inorder traversal of one tree insert into another? > > > On Sat, Oct 8, 2011 at 4:33 PM, Ankur Garg <[email protected]> wrote: > >> Hi , >> >> Can anyone think of any better for doing this other than converting into >> List and then converting back again to BST .. >> >> Regards >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
