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 SortSelection Sort minimizes swaps among standard in-place sorting algorithms, performing at most n-1 swaps. Other algorithms like Insertion Sort or Quick Sort…

  1. A.

    Insertion Sort

  2. B.

    Quick Sort

  3. C.

    Heap Sort

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