Re: [algogeeks] Re: median of array

2010-07-09 Thread TurksHead Education
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

Re: [algogeeks] Re: median of array

2010-07-06 Thread Jitendra Kushwaha
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,

[algogeeks] Re: median of array

2010-07-06 Thread Dave
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