91. In insertion sort, the average number of comparisons required to place the 7th element into its correct position is . . . . . . . .
92. Which of the following is not true about library sort?
93. Cycle sort is an adaptive sorting algorithm.
94. In binary tree sort, we first construct the BST and then we perform . . . . . . . . traversal to get the sorted order.
95. Which one of the following sorting algorithm requires recursion?
96. How many comparisons will be required to sort the array arr={5, 4, 7, 1, 9} using bead sort?
97. What is the other name for a shell sort algorithm?
98. What will be the output of the given C++ code?
#include <bits/stdc++.h>
using namespace std;
int main()
{
int arr[] = {1, 3,4,2,5};
int n = sizeof(arr)/sizeof(arr[0]);
sort(arr+2, arr+n, greater<int>());
int a;
for (int a = 0; a < n; a++)
cout << arr[a] << " ";
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
int arr[] = {1, 3,4,2,5};
int n = sizeof(arr)/sizeof(arr[0]);
sort(arr+2, arr+n, greater<int>());
int a;
for (int a = 0; a < n; a++)
cout << arr[a] << " ";
return 0;
}
99. Which of the following sorting algorithm is stable?
100. Which of the following statement is not a stable sorting algorithm?
Read More Section(Sorting Algorithms)
Each Section contains maximum 100 MCQs question on Sorting Algorithms. To get more questions visit other sections.