Question:

To sort a list having n elements, the Selection sort makes .......... number of passes through the list.

Show Hint

Selection sort is an in-place sorting algorithm that minimizes the number of swaps by selecting the minimum element in each pass.
Updated On: Apr 24, 2025
  • \(n^2\)
  • \(n\)
  • \(n-1\)
  • \(n+1\)
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

In the selection sort algorithm, the number of passes required is \(n-1\) because in each pass the algorithm selects the smallest (or largest) element from the unsorted portion of the list and places it in its correct position. Therefore, \(n-1\) passes are needed to sort the list.
Was this answer helpful?
0
0

Questions Asked in CUET exam

View More Questions