Question DSA-SORT-0014
MediumHow many swaps does selection sort make on an array of n elements in the worst case?
- A.
n log n
- B.
n²
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Sorting question
How many swaps does selection sort make on an array of n elements in the worst case?
n log n
n²
Sign up free to see the answer and a step-by-step explanation.
n(n − 1)/2
n − 1