Selection Sort Visualization

Watch how Selection Sort finds the minimum element and places it in the correct position

Color Legend
Unsorted
Current Minimum
Comparing
Swapping
Sorted
Initial State

Click "Start Sorting" to begin the visualization

How Selection Sort Works
  1. Find the minimum element in the unsorted portion of the array
  2. Swap it with the first element of the unsorted portion
  3. Move the boundary of the sorted portion one position to the right
  4. Repeat until the entire array is sorted