Question discussion

What is the best case and worst-case complexity of selection sort?

3075Easy DSSSB TGT Computer Science 0 replies 2 views
0

What is the best case and worst-case complexity of selection sort?

  • AO(nlogn)
  • BO(n)
  • CO(n2)
  • DO(logn)
Correct answer: C

Explanation

Selection sort always scans the remaining array to find the minimum, so both the best and the worst case are O(n2).

Discussion 0

Nobody has replied yet. Start the discussion!