Selection Sort
Selection sort finds the smallest remaining item and swaps it into place. It always scans the unsorted part.
Costs
| Category | Algorithm |
| Difficulty | Easy |
| Comparisons | O(n²) |
| Swaps | O(n) |
| Extra memory | O(1) |
Questions
What is Selection Sort?
Selection sort finds the smallest remaining item and swaps it into place. It always scans the unsorted part.
Where do I practice it?
DSA Master keeps challenges and progress on the phone. This page is the idea and the costs.