1,770 views
4 votes
4 votes
Selection sort is an example of ____(I)_______ and insertion sort is an example of __(II)______.

a) I- Greedy, II- Brute Force

b) I- Brute Force II- Divide and conquer

c) I- Greedy II- Divide and conquer

d) I- Brute Force II- Brute Force

1 Answer

0 votes
0 votes
Insertion sort don't follow DAC approach.

if you think it follow , tell me the recurrence relation.

We can include selection sort in Brute force domain. As first we filter smallest element then next smallest element and then next until whole list is sorted.

Related questions

0 votes
0 votes
3 answers
1
radha gogia asked Jul 17, 2015
941 views
If we talk about that since since we cant access any random element in a linked list for that reason quick sort cant be used for linked lists ,then in merge sort also we ...
1 votes
1 votes
0 answers
2
0 votes
0 votes
1 answer
3
LavTheRawkstar asked Jan 12, 2017
808 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[...