← 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?
- A.[10, 29, 14, 37, 13]
- B.[10, 13, 14, 29, 37]
- C.[29, 10, 14, 13, 37]
- 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 →