What is the number of swaps required to sort n elements using selection sort, in the worst case?

The site i am referring says theta(n).

Shouldnt it be theta(n2), cuz worst case it requires n swaps for each of the n elements.

Recommended Topics