Recent questions tagged quick-sort

0 votes
1 answer
31
0 votes
1 answer
34
1 votes
1 answer
35
0 votes
1 answer
38
0 votes
1 answer
40
QUICKSORT(A,p,r) 1 if p < r 2 q = PARTITION(A,p,r) 3 QUICKSORT(A, p , q-1) 4 QUICKSORT(A, q + 1, r)How would you modify QUICKSORT to sort into nonincreasing order?
0 votes
1 answer
41
0 votes
1 answer
42
0 votes
1 answer
47
1 votes
2 answers
49
0 votes
1 answer
52
In Quicksort let n/7​ th ​ smallest element is chosen using an O(n2​ ) algorithm as thepivot. Calculate the worst case time complexity of the algorithm.
1 votes
2 answers
53
What is the worst case time complexity of Quick Sort?Is it nlogn or n2
0 votes
1 answer
54
True or False :In randomized quicksort , each key is involved in the same number of comparisons.
0 votes
1 answer
57
If given numbers are 12,7,15,8,19,20,17,21,5,3 in _______ passes of quick sort element 5 will be in sorted position. (Considering last element as pivot)
1 votes
1 answer
58
After applying few passes of quick sort on a given array, the following output was obtained:1,10,5,8,25,44,55,30,70Then how many pivot elements are there in the above ou...
0 votes
2 answers
59
The maximum number of swap possible of an unsorted array[1....n] in quicksort is?a) O(n)b) O($n^{2}$)Explain briefly.