Library
Exercises
Games
Exams
Resources
Forum
News
Light
Log in
Sign up
Library
Exercises
Games
Exams
Resources
Forum
News
All courses
Library
Sorting Algorithms
Complexity of selection sort
MCQ
What is the complexity of selection sort in the worst case, as well as in the best case?
Possible answers
O(n), because it stops as soon as the array is sorted
O(n²), because it always searches for the minimum in the whole rest of the array
O(log n), because it splits the array in two at each step
O(n log n), like merge sort
Log in to reply
Exercise 1 of 4
Next exercise
Report a mistake or suggest an improvement