Statement 1: In insertion sort, after m passes through the array, the first m elements are in sorted order. Statement 2: And these elements are the m smallest elements in the array.

Statement 1: In insertion sort, after m passes through the array, the first m elements are in sorted order. Statement 2: And these elements are the m smallest elements in the array. Correct Answer Statement 1 is true but statement 2 is false

In insertion sort, after m passes through the array, the first m elements are in sorted order but they are whatever the first m elements were in the unsorted array.
Bissoy MCQ

Related Questions

A teacher asked the class to subtract 5 from 75.70% of the class said: 25. Their work was shown as: \(\begin{array}{*{20}{c}} {\begin{array}{*{20}{c}} 7&5 \end{array}}\\ {\underline {\begin{array}{*{20}{c}}\ { - 5} \ \ \ &{} \end{array}} }\\ {\underline {\begin{array}{*{20}{c}} 2&5 \end{array}} } \end{array}\) Which of the following describes the most appropriate remedial action that the teacher should take to clarify this misconception?
Why is insertion sort preferred over other sorting algorithms (like selection sort, bubble sort etc.) for Tim sort implementation?