Question 14958 – DSSSB TGT 2017
February 20, 2024Question 11772 – Sorting
February 20, 2024Question 9327 – Sorting
Which one of the following in place sorting algorithms needs the minimum number of swaps?
Correct Answer: C
Question 17 Explanation:
Selection sort requires minimum number of swaps i.e O(n). The algorithm finds the minimum value, swaps it with the value in the first position, and repeats these steps for the remainder of the list. It does no more than n swaps, and thus is useful where swapping is very expensive.
Quick sort
Insertion sort
Selection sort
Heap sort
Subscribe
Login
0 Comments