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
![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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F40a93fbf-cd84-46cf-939a-402485a39dd9%2Faabbb433-182b-4a1c-bb0b-a46aa717f7a1%2Fo2kfe0v_processed.png&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
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
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)