Both the algorithms are explained in great detail at the below link: http://www.rawkam.com/?p=870
- On Wed, Jul 7, 2010 at 8:39 AM, Dave <[email protected]> wrote: > Of course O(n) is the average complexity. The worst-case complexity is > O(n^2). There is a divide and conquer algorithm with O(n) worst-case > complexity. > > Dave > > On Jul 5, 11:54 pm, Jitendra Kushwaha <[email protected]> > wrote: > > do quicksort like operation to find the pivot till you get the pivot of > n/2 > > position recursively. > > Complexity will be O(n) > > > > -- > > Regards > > Jitendra Kushwaha > > MNNIT, Allahabad > > -- > 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]<algogeeks%[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.
