Step 1/0
Custom array:
Complexity
Best:O(n²)
Average:O(n²)
Worst:O(n²)
Space:O(1)
Description
Divides the array into sorted and unsorted regions. Repeatedly finds the minimum element from the unsorted region and places it at the beginning.
When to use
Simple to implement. Use for small arrays where write operations are costly (minimizes swaps). Not suitable for large datasets.