Which of the following is the biggest advantage of selection sort?

2024

Which of the following is the biggest advantage of selection sort?

  1. A.

    it has low time complexity

  2. B.

    it has low space complexity

  3. C.

    it requires at most n-1 swaps under any condition

  4. D.

    More than one of the above

  5. E.

    None of the above

Attempted by 765 students.

Show answer & explanation

Correct answer: C

Concept: What Makes an Advantage the "Biggest"

When a question asks for the single biggest or defining advantage of an algorithm, the correct choice must be a property that is both factually true AND uniquely distinguishing — a property that sets the algorithm apart from its close peers. A statement that is merely true but shared by several similar algorithms does not qualify, because it fails to explain why this particular algorithm stands out.

Applying the Concept to Selection Sort

Selection sort repeatedly scans the unsorted part of the list, finds the minimum element, and swaps it into place. Its time complexity is O(n squared) in the best, average, and worst cases, so it is never a low-time-complexity algorithm. It does sort in place using only O(1) extra space, but insertion sort and bubble sort also achieve O(1) space, so this trait is common, not unique. What genuinely sets selection sort apart is that it performs at most n-1 swaps no matter how the input is initially arranged; bubble sort and insertion sort, by contrast, can require far more swaps or shifts on an unsorted input. This bounded, input-independent swap count is why selection sort is preferred when each write or swap operation is expensive, such as on flash memory.

Contrasting Each Option

  • It has low time complexity: false; the time complexity stays O(n squared) in every case, never low.

  • It has low space complexity: true, but bubble sort and insertion sort share this O(1)-space trait too, so it does not uniquely distinguish selection sort.

  • It requires at most n-1 swaps under any condition: true and, unlike the space-complexity statement, this is the property that is genuinely unique among the common O(n squared) sorts, since the swap count never depends on the input's initial order.

  • More than one of the above: incorrect, because exactly one statement is both correct and uniquely distinguishing; a true-but-common trait does not count as an additional biggest advantage.

  • None of the above: incorrect, because one statement does correctly and uniquely describe selection sort's advantage.

Result

The biggest, distinguishing advantage of selection sort is its bounded, input-independent swap count of at most n-1 swaps.

Explore the full course: Up Lt Grade Assistant Teacher 2025