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?
Answer: D. Selection Sort — Selection Sort minimizes swaps among standard in-place sorting algorithms, performing at most n-1 swaps. Other algorithms like Insertion Sort or Quick Sort…
- A.
Insertion Sort
- B.
Quick Sort
- C.
Heap Sort
- D.
Selection Sort
Attempted by 626 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.
Explore the full course: Iocl Engineers Officers Grade A Paper 2
Loading lesson…