Q.1.
Which of the following is correct with regard to insertion sort?
Q.2.
Which of the following sorting algorithm is best suited if the elements are already sorted?
Q.3.
The worst case time complexity of insertion sort is O(n2). What will be the worst case time complexity of insertion sort if the correct position for inserting element is calculated using binary search?
Q.4.
Insertion sort is an example of an incremental algorithm.
Q.5.
Consider the code given below, which runs insertion sort: void insertionSort(int arr[], int array_size) { int i, j, value; for (i =i < array_size; i++) { value = arr[i]; j = i; while (________ ) { arr[j] = arr[j − 1]; j = j − } arr[j] = value; } }
Q.6.
Which of the following is good for sorting arrays having less thanelements?
Q.7.
Consider an array of lengtharr[= {9,7,4,2,1}. What are the steps of insertions done while running insertion sort on the array?
Q.8.
StatementIn insertion sort, after m passes through the array, the first m elements are in sorted order.
Q.9.
In insertion sort, the average number of comparisons required to place the 7th element into its correct position is ____
Q.10.
Which of the following is not an exchange sort?