edited by
4,570 views
0 votes
0 votes

Which of the following input will give best case time for selection sort?

(A) 1 2 3 4 5 6 7 8 9 10

(B) 2 3 1 5 9 7 8 6 10

(C) 10 9 8 7 6 5 4 3 2 1 

(D) All of above take same amount of time

edited by

1 Answer

0 votes
0 votes
Option D) All take same time as Complexity of Selection sort in every case is O(n^2)

Related questions

2 votes
2 votes
4 answers
1
Ramij asked Dec 20, 2018
2,339 views
Suppose there are 4 sorted list of 16 elements each. If we merge these lists into a single sorted list of 64 elements. The key comparisons that are needed in the worst ca...
0 votes
0 votes
2 answers
3
naveen81 asked Jan 30, 2017
729 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]