Algomination
Sorting
Searching
Data Structures
About
Contact
All sorting algorithms
Selection Sort
Time O(n²)
Space O(1)
Selects the smallest remaining element each pass and moves it into place.
Visualize
Random
8
4
1
6
3
9
2
Starting Selection Sort.
Play
Step 1 / 50
0.5×
1×
2×
4×
Minimum
Comparing
Swapping
Sorted