C Implementation of Selection Sort Technique
Selection Sort:
Selection Sort:
- Has the time complexity of O(n^2)
- Logic:
- Find the index of the minimum element from the array from 0 to n-1
- Swap the minimum value with the value in the 0th index
- Again, Find the index of the minimum element from the array from 1 to n-1
- Swap the minimum value with the value in the 1st index
- Repeat the process till you reach the (n-1)th index of the array