The selection sort on a list of 'n' elements has _______ number of passes.
The selection sort on a list of 'n' elements has _______ number of passes.
Solution
✅ Correct Option: 4
Selection sort finds the smallest element in the unsorted part and swaps it into its correct position, one position per pass. After passes, the first elements are in their final places, so the last element is automatically correct and needs no pass of its own.
Option 1: a common mistake. The last element never needs its own pass.
Option 3: describes the time complexity, , not the number of passes.
Total comparisons are , which is where the comes from.
Related questions:
2025: 16 May Shift 1
2026: 11 May Shift 2
2025: 22 May Shift 1
2025: 30 May Shift 2