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 Connections
Sources
1. Wikipedia, Selection sort
Lead sectionQuote, 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.
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.