retagged by
864 views
0 votes
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
retagged by

1 Answer

Related questions

0 votes
0 votes
1 answer
1
LavTheRawkstar asked Jan 12, 2017
839 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[...
1 votes
1 votes
0 answers
2
9 votes
9 votes
2 answers
4
vineet.ildm asked Nov 7, 2016
5,939 views
Why space complexity of heapsort is O(1)....and why not O(logn)..because of space required by recursion calls which is equivalent to height of the tree...where am i getti...