# Top MCQs on InsertionSort Algorithm with Answers

Question 1

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.

• 4 5 3 2 1

3 4 5 2 1

2 3 4 5 1

1 2 3 4 5

• 5 4 3 1 2

5 4 1 2 3

5 1 2 3 4

1 2 3 4 5

• 4 3 2 1 5

3 2 1 5 4

2 1 5 4 3

1 5 4 3 2

• 4 5 3 2 1

2 3 4 5 1

3 4 5 2 1

1 2 3 4 5

Question 2

Which is the correct order of the following algorithms with respect to their time Complexity in the best case ?
• Merge sort > Quick sort >Insertion sort > selection sort
• insertion sort < Quick sort < Merge sort < selection sort
• Merge sort > selection sort > quick sort > insertion sort
• Merge sort > Quick sort > selection sort > insertion sort

Question 3

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.
```
• Insertion sort is stable, online but not suited well for large number of elements.
• Insertion sort is unstable and online
• Insertion sort is online and can be applied to more than 100 elements
• Insertion sort is stable & online and can be applied to more than 100 elements

Question 4

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  ?
• 50
• 25
• 75
• 100

Question 5

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

• The memory (space) required to process the data is not constant.

• It means the amount of extra memory Insertion Sort consumes doesn't depend on the input. The algorithm should use the same amount of memory for all inputs.

• It takes only 1 kb of memory.

• It is the speed at which the elements are traversed.

Question 6

What is the best sorting algorithm to use for the elements in array are more than 1 million in general?
• Merge sort.
• Bubble sort.
• Quick sort.
• Insertion sort.

Question 7

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

• Insertion Sort

• Heap Sort

• Merge Sort

• Selection Sort

Question 8

Which of the following sorting algorithms has the minimum running time complexity in the best and average case?
• Insertion sort, Quick sort
• Quick sort, Quick sort
• Quick sort, Insertion sort
• Insertion sort, Insertion sort

Question 9

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

• Insertion Sort

• Merge Sort

• Quick Sort

• Bubble Sort

Question 10

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

• N

• N*log(N)

• N2

• N*log(N)2

There are 13 questions to complete.

Last Updated :
Take a part in the ongoing discussion