155k views
5 votes
How many comparisons would be needed to sort an array containing 100 elements using a selection sort if the original array values were already sorted?

a. 10,000
b. 9,900
c. 4,950
d. 99
e. None of these

User SeaSky
by
7.4k points

2 Answers

3 votes
Your answer would be C. 4,950
User Paulmurray
by
7.6k points
2 votes
The answer is c 4,950
User Florin Mogos
by
7.5k points