If the list have 'n' elements then how many passes/iteration will the selection sort take to sort the array?
If the list have 'n' elements then how many passes/iteration will the selection sort take to sort the array?
Solution
✅ Correct Option: 1
Selection sort fixes one element in its final position in each pass: pass 1 puts the smallest element at index 0, pass 2 puts the next smallest at index 1, and so on. After passes, the last remaining element is already in its correct place, so no extra pass is needed.
Option 2: passes is a common guess, but the last pass would only compare the final element with nothing.
Option 4: is the time complexity, i.e. the order of the number of comparisons, not the number of passes.
Related questions:
2026: 20 May Shift 1
2026: 26 May Shift 1
2026: 21 May Shift 1
2026: 21 May Shift 1