Selection sort on n elements always performs approximately
- A
comparisons on a sorted input
- B
comparisons in the worst case
- Ccheck_circle
comparisons regardless of input order
- D
comparisons in the best case
Explanation
Selection sort scans the unsorted portion fully each pass: n + (n-1)
<ul> <li>... + 1 ≈ n²/2 comparisons. Best/worst/average all O(n²); input order doesn't matter.</li> </ul>