1,347 views
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)

Please log in or register to answer this question.

Position:
Show:

Related questions

0 0 votes
3 answers 3 answers
1.8k
1.8k views
targate2018 asked Dec 5, 2017
1,799 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 0 votes
1 1 answer
509
509 views
amit166 asked Sep 11, 2018
509 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 0 votes
2 2 answers
602
602 views
amit166 asked Sep 11, 2018
602 views
find time complexityf(int n){int i=1;while(i<n){int j=n;while(j>0)j=j/2;i=i*2;}}