🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Sorting Basics: all 13 questions

Quiz: Sorting Basics · Question 10 of 13

After the FIRST pass of selection sort on [29, 10, 14, 37, 13], what is the array?

After the FIRST pass of selection sort on [29, 10, 14, 37, 13], what is the array?

  1. A.[10, 29, 14, 37, 13]
  2. B.[10, 13, 14, 29, 37]
  3. C.[29, 10, 14, 13, 37]
  4. D.[10, 14, 29, 13, 37]
Answer & explanation

Correct answer: [10, 29, 14, 37, 13]

The first pass finds the smallest value, 10, and swaps it with the first item, 29. Nothing else moves.

Can you get the rest right without peeking?

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

Start the quiz →