@subramania jeeva i think the your algorithm will have O(n^2) worst case when the list is sorted..
On Mon, Jun 6, 2011 at 7:22 PM, subramania jeeva <[email protected]>wrote: > Tree formation will also take O(nlgn).. For inserting each node It'll take > O(lgn).. so for inserting n nodes It'll take O(nlgn) time..:) > > > > > > > > Cheers > ~ Jeeva ~ > > > > -- > 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. > -- Gaurav Aggarwal SCJP -- 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.
