Selection Sort
Find the minimum element and swap it to the front each pass.
Sorted
Current min
Comparing
Unsorted
Controls
Time: O(n²) always | Space: O(1) | Not stable
Steps
0 stepsPress Run to trace the algorithm one step at a time.