71. There is a one line error in the following routine. Find that line.
1. int Max(int a[], int n)
2. {
3. int mi, i;
4. for (mi = 0, i = 0; i < n; i++)
5. if (a[i] > a[mi])
6. mi = i;
7. return mi;
8. }
1. int Max(int a[], int n)
2. {
3. int mi, i;
4. for (mi = 0, i = 0; i < n; i++)
5. if (a[i] > a[mi])
6. mi = i;
7. return mi;
8. }
72. What is the worst case time complexity of randomized quicksort?
73. What is the time taken to copy elements to and from two arrays created for deletion?
74. Which of the following is not true about bucket sort?
75. What is the worst case time complexity of permutation sort?
76. Pigeonhole sort is a stable sorting algorithm.
77. What is the average number of inversions in an array of N distinct numbers?
78. Cocktail sort uses which of the following methods for sorting the input?
79. Which of the following is Python's standard sorting algorithm?
80. The given array is arr = {2, 3, 4, 1, 6}. What are the pivots that are returned as a result of subsequent partitioning?
Read More Section(Sorting Algorithms)
Each Section contains maximum 100 MCQs question on Sorting Algorithms. To get more questions visit other sections.