I had a doubt , if we simply go on constructing the tree from preorder traversal one gets the same tree back.... am I missing something here
On Oct 19, 7:49 am, sravanreddy001 <sravanreddy...@gmail.com> wrote: > @Sunny, Rahul: > Thanks a lot.. :) > > @Anshu: the code is perfect, This would be h = n* (height of BST) --> O(h) > O(n^2) is the worst case right? and has complexity similar to quick sort? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@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.