← Back to Gallery

Selection Sort

Comparisons:0
Swaps:0
Array Accesses:0
Pass:0
Status:Ready

Selection Sort

Divides the array into sorted and unsorted regions. Repeatedly finds the minimum in the unsorted region and swaps it to the front.

Worst:   O(n²)
Average: O(n²)
Best:    O(n²)
Space:   O(1)
Swaps:   O(n) maximum

Good for: small arrays, minimizing swaps, memory-write-constrained systems.