Re: [algogeeks] Analysis of Partial Sorting.

2012-06-17 Thread Amitesh Singh
Thanks Hassan. But I was more interested in knowing the mathematic proof of Partial Quick Sort. -- Amitesh On Sun, Jun 17, 2012 at 7:54 PM, Hassan Monfared wrote: > O(N*logM) > > On Sat, Jun 16, 2012 at 5:15 PM, Amitesh Singh wrote: > >> Hi Guys, >> >> *Problem: *Rearrange a given array with

Re: [algogeeks] Analysis of Partial Sorting.

2012-06-17 Thread Hassan Monfared
O(N*logM) On Sat, Jun 16, 2012 at 5:15 PM, Amitesh Singh wrote: > Hi Guys, > > *Problem: *Rearrange a given array with n elements, so that m places > contain the m smallest elements in ascending order. > > *Solution 2:* using QuickSort method approach. > [image: n = r -p + 1] > > [image: \bold{PA

[algogeeks] Analysis of Partial Sorting.

2012-06-16 Thread Amitesh Singh
Hi Guys, *Problem: *Rearrange a given array with n elements, so that m places contain the m smallest elements in ascending order. *Solution 2:* using QuickSort method approach. [image: n = r -p + 1] [image: \bold{PARTIAL-QUICKSORT(A,p,r,m)}: \newline if\; phttp://amiteshsingh.wordpress.com/2012/