• retagged by
4,073 views
0 0 votes

Which of the following sorting algorithms has/have minimum running time complexity in best case?

I. Selection Sort

II. Insertion Sort


a. I

b. II

c. Both have same minimum running time complexity

2 Answers

1 1 vote
Insertion sort has  minimum running time complexity O(n) in best case i.e when the array is already sorted.

Worst case time complexity of insertion sort =O($n^{2}$ )and selection sort is also O($n^{2}$)

Ans:B)
Position:
Show:

Related questions

1 1 vote
1 1 answer
10.4k
10.4k views
sripo asked Dec 23, 2018
10,415 views
Which of the below given sorting techniques has highest best-case runtime complexity.(A) Quick sort(B) Selection sort(C) Insertion sort(D) Bubble sortAnswer: (B)Explanati...
0 0 votes
1 1 answer
1.3k
1.3k views
LavTheRawkstar asked Jan 12, 2017
1,301 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
2 2 answers
2.8k
2.8k views
vishal chugh asked Jan 24, 2018
2,782 views
What is the worst case time complexity to find kth smallest element into an array of ‘n’ element?
1 1 vote
1 answers 1 answer
13.1k
13.1k views
rahuldb asked May 7, 2017
13,073 views
Derive the best and worst case complexity of insertion sort algorithm?