Selection Sort Visualizer & Calculator
Step-by-step Selection Sort execution visualizer tracking minimum element indices, swaps, and comparisons.
Selection Sort
Enter your custom input data → Run the real algorithm engine → Observe step transitions.
⚙️ Customize Algorithm Input Data
Initial array state for Selection Sort.
Algorithm state rule requirement
State pointers updated
Mathematical Formula
Overview & Explanation
Selection Sort divides the array into a sorted and unsorted region, repeatedly picking the minimum element from the unsorted region and moving it to the sorted region.
How It Works
- Find the smallest element in the unsorted subarray.
- Swap it with the element at the beginning of the unsorted subarray.
- Advance the boundary between sorted and unsorted subarrays.
Practical Applications
- Small array sorting with minimal memory writes
- Algorithm analysis
Selection Sort Example
Sorting array [29, 10, 14, 37, 13]
Step 1
Min = 10
Step 2
Min = 13
Completion
Sorted
Frequently Asked Questions
Is Selection Sort stable?
Related Calculators
Bubble Sort Visualizer & Step Calculator
Interactive step-by-step Bubble Sort execution visualizer with comparisons, swaps, and time complexity breakdown.
Insertion Sort Visualizer & Step Generator
Interactive Insertion Sort step generator showing array shifts and key element insertion.
Quick Sort Visualizer & Partition Calculator
Step-by-step Quick Sort partition visualizer demonstrating pivot selection, left/right pointers, and recursion tree.