GATE CS 2013 · Question 6 · Algorithms · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer

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²)
Answer

Answer (B)

Answer from the official GATE CS 2013 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes