Which one of the following in-place sorting algorithms needs the minimum…
2017
Which one of the following in-place sorting algorithms needs the minimum number of swaps?
- A.
Insertion Sort
- B.
Quick Sort
- C.
Heap Sort
- D.
Selection Sort
Attempted by 255 students.
Show answer & explanation
Correct answer: D
Selection Sort minimizes swaps among standard in-place sorting algorithms, performing at most n-1 swaps. Other algorithms like Insertion Sort or Quick Sort typically require more data movements during execution.