The GATE Grind

GATE 2009 CS – Question 11

Algorithms · Searching, Sorting and Hashing · 1 mark · Multiple choice

What is the number of swaps required to sort n elements using selection sort, in the worst case?

  1. $\Theta(n)$
  2. $\Theta(n\log n)$
  3. $\Theta(n^2)$
  4. $\Theta(n^2\log n)$

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (A) $\Theta(n)$

Explanation

We are sorry we couldn't write detailed soluition for this, we are working on it!, please consider asking your own AI, its just 2-3 clicks with very minimum effort

More Searching, Sorting and Hashing questions

All Searching, Sorting and Hashing questions →