GATE CS 2013 · Selection Sort

MCQ · 1 mark · Problem PROG-SORT-0040

Which one of the following is the tightest upper bound that represents the number of swaps required to sort n numbers using selection sort?
  1. A
    O(log n)
  2. B
    O(n)
  3. C
    O(n log n)
  4. D
    \(O(n^{2})\)

Solve it on GATE DA practice →More Searching & Sorting Algorithms problems

Show the worked solutionOfficial GATE Answer Key: Option B.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/1415/gate2013-6

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com