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. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.