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?

  1. A.

    Insertion Sort

  2. B.

    Quick Sort

  3. C.

    Heap Sort

  4. 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.

Explore the full course: Isro