Question 50Asked in DSSSB TGT Computer Science (Technical), 13 Sep 2025, Shift 3 (5:00 PM)

What is the maximum number of swaps that can be performed in the Selection Sort

What is the maximum number of swaps that can be performed in the Selection Sort algorithm?
  1. A1
  2. Bn - 1
  3. Cn - 2
  4. Dn
Show answerHide answer

Correct answer: (B) n - 1

Explanation

Selection sort does at most one swap per pass, and there are n − 1 passes, so at most n − 1 swaps.

From DSSSB TGT Computer Science PYQ (Technical), 13 Sep 2025, Shift 3 (5:00 PM)

This is question 50 of DSSSB TGT Computer Science PYQ (Technical), 13 Sep 2025, Shift 3 (5:00 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.