When the input is a list of n integers that are in strictly decreasing order (that is, no equal elements), to sort them in increasing order Insertion Sort makes a total of: (a) n - 1 comparisons (b) 2n 1 comparisons (c) n(n-1)/2 comparisons (d) none of the above
When the input is a list of n integers that are in strictly decreasing order (that is, no equal elements), to sort them in increasing order Insertion Sort makes a total of: (a) n - 1 comparisons (b) 2n 1 comparisons (c) n(n-1)/2 comparisons (d) none of the above
Related questions
Question

Transcribed Image Text:When the input is a list of n integers that are in strictly decreasing order (that is, no equal elements),
to sort them in increasing order InsertionSort makes a total of:
(a) n − 1 comparisons
(b) 2n-1 comparisons
(c) n(n − 1)/2 comparisons
(d) none of the above
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps
