Re: [algogeeks] Pivot postion of quick sort

2012-09-16 Thread Ouyang
for a pivot picked randomly, even the same input array would have different time complexity going through quicksort thousands of thousands of times. the worst case could happen too(but the probability is very small), so random-pivot-set has statistically on average O(logN), we are talking about av

Re: [algogeeks] Pivot postion of quick sort

2012-09-15 Thread atul anand
typo error :- we can make it *independent** of this input format On Sat, Sep 15, 2012 at 11:56 PM, atul anand wrote: > pivot position plays important role in determining the time complexity of > the algorithm. > suppose array is already sorted then if you go by obvious means by > selecting pivot

Re: [algogeeks] Pivot postion of quick sort

2012-09-15 Thread atul anand
pivot position plays important role in determining the time complexity of the algorithm. suppose array is already sorted then if you go by obvious means by selecting pivot element as the 1st element of the input array,then recurrence will be :- T(n)=T(n-1)+theta(n) hence complexity of the algo wil

[algogeeks] Pivot postion of quick sort

2012-09-15 Thread sulekha metta
hi every one!! how does pivot position effect the efficiency in quick sort algorithm thanks in advance -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscri