adplus-dvertising
frame-decoration

Question

__________ comparisons required to sort the list 1, 2, 3…….n using insertion sort.

a.

(n² + n + 2) / 2

b.

(n³ + n – 2) / 2

c.

(n² + n – 2) / 2

d.

(n² – n – 2) / 2

Posted under Discrete Mathematics

Answer: (c).(n² + n – 2) / 2

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. __________ comparisons required to sort the list 1, 2, 3…….n using insertion sort.

Similar Questions

Discover Related MCQs

Q. The Worst case occurs in linear search algorithm when ____________

Q. List obtained in third pass of selection sort for list 3, 5, 4, 1, 2 is ___________

Q. The operation of processing each element in the list is known as _________

Q. The complexity of Bubble sort algorithm is _________

Q. An Algorithm is ___________

Q. An algorithm in which we divide the problem into subproblem and then we combine the subsolutions to form solution to the original problem is known as _________

Q. An algorithm which uses the past results and uses them to find the new results is _________

Q. A Complexity of algorithm depends upon _________

Q. An algorithm which tries all the possibilities unless results are satisfactory is and generally is time-consuming is _________

Q. For a recursive algorithm _________

Q. Optimization of algorithm means _________

Q. For an algorithm which is the most important characteristic that makes it acceptable _________

Q. An algorithm can be represented through _________

Q. There are two algorithms suppose A takes 1.41 milli seconds while B takes 0.9 milliseconds, which one of them is better considering all other things the same?

Q. Which of the following case does not exist in complexity theory?

Q. The complexity of linear search algorithm is _________

Q. The complexity of Binary search algorithm is _________

Q. The complexity of merge sort algorithm is _________

Q. The Worst case occur in linear search algorithm when _________

Q. The worst case complexity for insertion sort is _________