Skip to main contentSkip to solution

Consider the list numlist = [58, 46, 63, 11, -16, 26]. What will be the sequence of elements after pass 3 of Selection sort?

Solution

✅ Correct Option: 3

Selection sort finds the smallest element in the unsorted part in each pass and swaps it into the next position from the left.

PassSmallest in unsorted partSwapList after pass
1-16with 58[-16, 46, 63, 11, 58, 26]
211with 46[-16, 11, 63, 46, 58, 26]
326with 63[-16, 11, 26, 46, 58, 63]

The list is fully sorted after pass 3, because the swaps happened to place the remaining elements in order.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question