Selection Sort
Selection Sort
h>
using namespace std;
/*
Complexity Analysis:
Use Cases:
- **When the number of swaps should be minimized** (Selection sort makes at most `n-1` swaps, unlike Bubble Sort which
- **Useful for small arrays** where efficiency is not a concern.
- **Good when writing to memory is costly**, as it minimizes the number of swaps.
*/