Skip to main contentSkip to solution

Given : numList = [8, 7, 13, 1, -9, 4] having 6 elements.

How many number of passes required to sort numList using selection sort?

Solution

✅ Correct Option: 4

Selection sort on nn elements needs n−1n - 1 passes. In each pass the smallest remaining element is placed in its correct position, and once n−1n - 1 elements are placed, the last one is already in position.

Here n=6n = 6, so passes =6−1=5= 6 - 1 = \boxed{5}.


Option 1: 6 passes would be counted if the last element were also treated as a pass, but a single remaining element needs no sorting.

Keyboard Shortcuts

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