593 views
0 votes
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)

Please log in or register to answer this question.

Related questions

0 votes
0 votes
3 answers
2
targate2018 asked Dec 5, 2017
620 views
m=1;for i=1 to n do begin m=m*3; for j=1 to m do {Something which is O(1)}What is the complexity of above algorithm?1. O(n*m3)2. O(n3)3. O(3n)...
0 votes
0 votes
1 answer
3
amit166 asked Sep 11, 2018
223 views
C function let n>=m.int gcd(n,m){if(n%m==0) return m;n=n%m;return gcd(m,n);} time complexity
0 votes
0 votes
2 answers
4
amit166 asked Sep 11, 2018
212 views
find time complexityf(int n){int i=1;while(i<n){int j=n;while(j>0)j=j/2;i=i*2;}}