edited by
770 views

1 Answer

1 votes
1 votes
I think the answer has to be (B) or (D) because the statment "Quick sort always takes less than 1 sec " is false due to max time complexity of $n^{2}$.

Now, selection sort always runs in $n^{2}$ time. So, (D) is discarded, atleast partially.

So, I think answer is (B).

The other reason is for (A) to be wrong choice for this question is Merge sort is taking 0.2 sec while selection sort is taking 2.77 hrs.

Related questions

0 votes
0 votes
2 answers
2
naveen81 asked Jan 30, 2017
737 views
a. i>0,K>0, a[K] a[max]b. i>0,K<0, a[K]< a[max]c. i<0,K>0, a[K] a[max]d. i>0,K>0, a[K]< a[max]
7 votes
7 votes
3 answers
3
ajit asked Sep 20, 2015
9,809 views
How many comparisons are needed to sort an array of length $5$ if a straight selection sort is used and array is already in the opposite order?$1$$10$$15$$20$