or a balanced BST can be made in step 3, in linear time too, if one objects to the skew model.
2010/1/29 ShingRay <masterrays...@gmail.com> > Oh, I have said something wrong. > 1. Inorder traverse both trees. This gives two sorted list. Θ(m+n) > 2. Merge the two sorted list A, B into a new one C. Θ(m+n) > 3. Build a new tree using C. Each node of the tree has just one child. > Θ(m+n) > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> > . > 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 algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.