Alorithms · Class 12 · CBSE · Science Computer Science

What is the array after the first complete pass of selection sort in ascending order on [29, 10, 14, 37, 13]?

Practice question from Alorithms (Class 12 · CBSE · Science Computer Science), with the correct answer and a step-by-step solution.

easy · MCQ · Q-D77CE7

What is the array after the first complete pass of selection sort in ascending order on [29, 10, 14, 37, 13]?

  1. A.[10, 29, 14, 37, 13]Correct answer
  2. B.[29, 10, 13, 37, 14]
  3. C.[10, 14, 13, 29, 37]
  4. D.[13, 10, 14, 37, 29]

Solution

In the first pass of selection sort, the smallest element in the entire unsorted portion is selected and swapped with the first element. The smallest value is 10, so the array becomes [10, 29, 14, 37, 13].

More from Alorithms

All of Alorithms

Practise more Computer Science

Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.

Start practising free

Free to start · No credit card needed