Skip to main content

Selection Sort Algo...

*
void section_sort(int array[],int n) { for(int i=0;i<n;i++) { int min_index=i; for(int j=i+1;j<n;j++) { if(array[min_index]>array[j]) { min_index=j; } } if (min_index != i) { int temporary; temporary=array[min_index]; array[min_index]=array[i]; array[i]=temporary; } } }

Quote:

Go as far as you can see; when you get there,you'll be able to see farther...