I need help to understand why the statement in Option E in the Unit 8 Assessment lesson is true. The description in the following explanation seems to contradict itself: “In a reverse sorted array, each element will be compared and shifted to the right for almost every iteration. This means that fewer comparisons and shifts are required compared to other sorting algorithms, making insertion sort more efficient in this specific case.” Doesn’t “each element” and “fewer comparisons and shifts” contradict with each other?
Actually, I don’t understand the statement itself “Insertion sort is generally faster for a reverse sorted array.” Are we looking at a descending array and trying to sort it into an ascending array, for example? Isn’t this the worst case scenario that requires O(n^2) iterations? I can’t tell insertion sort is faster in this case.
On the other hand, if the statement in Option B is false, the statement in Option E should also be false, right?
B. Selection sort is generally slower than insertion sort on a randomized list.
E. Insertion sort is generally faster for a reverse sorted array.