1void selectionSort(int array[], int size)
2{
3 int minIndex, minValue;
4
5 for (int start = 0; start < (size - 1); start++)
6 {
7 minIndex = start;
8 minValue = array[start];
9 for (int index = start + 1; index < size; index++)
10 {
11 if (array[index] < minValue)
12 {
13 minValue = array[index];
14 minIndex = index;
15 }
16 }
17 swap(array[minIndex], array[start]);
18 }
19}
1def ssort(lst):
2 for i in range(len(lst)):
3 for j in range(i+1,len(lst)):
4 if lst[i]>lst[j]:lst[j],lst[i]=lst[i],lst[j]
5 return lst
6if __name__=='__main__':
7 lst=[int(i) for i in input('Enter the Numbers: ').split()]
8 print(ssort(lst))