🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Searching and Sorting in C: all 10 questions

Quiz: Searching and Sorting in C · Question 9 of 10

What is the main advantage of selection sort?

What is the main advantage of selection sort?

  1. A.It is O(n) on sorted input
  2. B.It makes at most n − 1 swaps
  3. C.It is stable
  4. D.It is O(n log n)
Answer & explanation

Correct answer: It makes at most n − 1 swaps

Fewer swaps help when writing data is costly, but comparisons are always about n²/2.

Can you get the rest right without peeking?

Take the timed Quiz: Searching and Sorting in C quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →