Top MCQs on InsertionSort Algorithm with Answers (original) (raw)

The auxiliary space of insertion sort is O(1), what does O(1) mean?

What is the worst case time complexity of insertion sort where position of the data to be inserted is calculated using binary search?

In a permutation a1.....an of n distinct integers, an inversion is a pair (ai, aj) such that i < j and ai > aj. What would be the worst-case time complexity of the Insertion Sort algorithm, if the inputs are restricted to permutations of 1.....n with at most n inversions?

Consider an array of elements arr[5]= {5,4,3,2,1} , what are the steps of insertions done while doing insertion sort in the array.

Which is the correct order of the following algorithms with respect to their time Complexity in the best case ?

Which of the following statements is correct with respect to insertion sort ?

*Online - can sort a list at runtime *Stable - doesn't change the relative order of elements with equal keys.

Consider the array A[]= {6,4,8,1,3} apply the insertion sort to sort the array . Consider the cost associated with each sort is 25 rupees , what is the total cost of the insertion sort when element 1 reaches the first position of the array ?

What is the best sorting algorithm to use for the elements in array are more than 1 million in general?

Which sorting algorithm will take least time when all elements of input array are identical? Consider typical implementations of sorting algorithms.

Which of the following is not a stable sorting algorithm in its typical implementation.

There are 13 questions to complete.

Take a part in the ongoing discussion