0 0 votes Given an array of n numbers, a median x exists such that x is larger than at least n/20 of the numbers and smaller than at lest n/20 numbers. If this x is used as a pivot in quick sort. What is the worst case running time of this algorithm? a. O(n) b. O(n11/10) 3. O(nlogn) 4.O(n2) 5. O(n10/11 log n) Algorithms algorithms time-complexity + – targate2018 1.3k views answer comment Share Follow Print See all 9 Comments 9 9 Comments reply Show 6 previous comments Anu007 commented Dec 5, 2017 reply Follow flag i just to find median of array i.e. n/2 element in sorted array, which will be grater than n/20 element as well as greater than. we can use medians of median algorithm. 0 0 replyShare joshi_nitish commented Dec 6, 2017 reply Follow flag @Shubhanshu your recurrence relation is not correct. you are taking 2T($\frac{n}{20}$), this means in next iteration you will only deal with $\frac{n}{20}+\frac{n}{20}$ = $\frac{n}{10}$ elements.. what about other elements ?? 0 0 replyShare Ashwin Kulkarni commented Dec 7, 2017 reply Follow flag Yes it is O(nlog20/19n) which we can consider as O(nlogn) if that particular value is not given in the option. 0 0 replyShare Please log in or register to add a comment.