Selection sort performs how many swaps in the worst case for n elements?
Show answerHide answer
Correct answer: (A) O(n)
Explanation
At most one swap per pass (n − 1 swaps).
Correct answer: (A) O(n)
Explanation
At most one swap per pass (n − 1 swaps).
This is question 149 of DSSSB TGT Computer Science Full Mock Test 5. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.