A comparison sort that repeatedly finds the smallest remaining element and moves it into its final sorted position, making the same number of comparisons regardless of the input's initial order.
Facts
Time Complexity
Time Complexity (category)Quadratic Time -- O(n^2) 1 Time Complexity Connections
Sources
1. Wikipedia, Selection sort
Lead section
It has a O(n2) time complexity, which makes it inefficient on large lists, and generally performs worse than the similar insertion sort.
- Wikipedia Selection sort infobox time O(n^2) comparisons
View the SourceWikidata: Selection Sort
Wikidata Q220831, class allow-list match (w-wdresolver-0926)View the Source Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.
Sign in to dispute this or suggest a correction.