21. What is the average case running time of an insertion sort algorithm?
22. Recursive bubble sort is a comparison based sort.
23. There is one small error in the following flip routine. Find out which line it is on.
1 void flip(int arr[], int i)
2 {
3 int t, init = 0;
4 while (init < i)
5 {
6 t = arr[init];
7 arr[i] = arr[init] ;
8 arr[i] = t;
9 init++;
10 i--;
11 }
12 }
1 void flip(int arr[], int i)
2 {
3 int t, init = 0;
4 while (init < i)
5 {
6 t = arr[init];
7 arr[i] = arr[init] ;
8 arr[i] = t;
9 init++;
10 i--;
11 }
12 }
24. Insertion sort is an example of an incremental algorithm.
25. Who invented the shell sort algorithm?
26. Which of the following method is used for sorting in merge sort?
27. How many arrays are required to perform deletion operation in a heap?
28. What is the average case time complexity of recursive insertion sort?
29. How many comparisons will be made in the worst case when an array of size n will be sorted by using a binary insertion sort algorithm?
30. In which of the following case stooge sort is most efficient (in terms of time complexity)?
Read More Section(Sorting Algorithms)
Each Section contains maximum 100 MCQs question on Sorting Algorithms. To get more questions visit other sections.