• retagged by
1,147 views
0 0 votes
Upon running  quicksort on a subarray with fewer than k elements, it returns without sorting subarray. After top level call to quicksort returns, insertion sort is run on entire array to finish sorting. Then the sorting algo runs in:

O(n lg(n/k) )   O(n+ n lg(n/k))    O(nk + n lg(n/k))        none

1 Answer

Position:
Show:

Related questions

0 0 votes
1 1 answer
1.3k
1.3k views
LavTheRawkstar asked Jan 12, 2017
1,287 views
INSERTION-SORT (A, n) ⊳ A[1 . . n]for (j ← 2 to len(A) ){key ← A[ j];i ← j – 1 ; while (i 0 and A[i] key) { A[i+1] ← A[i...
1 1 vote
0 0 answers
1.5k
1.5k views
2 2 votes
3 3 answers
13.0k
13.0k views
Orochimaru asked Jan 27, 2017
13,022 views
Consider the array A[]= {6,4,8,1,3} apply the insertion sort to sort the array . Consider the cost associated with each sort is 25 rupees , what is the total cost of the ...
2 2 votes
1 answers 1 answer
652
652 views
Diksha Aswal asked Jul 8, 2017
652 views
How to get Time Complexity of finding the number of inversions in an array?