Single Choice
Easy
QWhat is the time complexity of a selection sort algorithm for sorting an array of n elements in the worst case?
ID: #15272
Time Complexity
200 views
Question Info
#15272Q ID
EasyDifficulty
Time ComplexityTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
Selection sort is an in-place comparison-based sorting algorithm that repeatedly selects the minimum or maximum element and places it in the sorted portion of the array. In the worst case, selection sort requires nested iterations, comparing each element with the remaining unsorted portion. This results in a quadratic time complexity of O(n^2).
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic