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 <dave_and_da...@juno.com> 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 <jitendra.th...@gmail.com>
> 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 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.

Reply via email to