Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Selection Sort
- void selection (int a[],int n) {
- int i,j,pos;
- for (i=1;i<n;i++) {
- pos=i;
- for (j=i+1;j<=n;j++)
- if(a[j]<a[pos])
- pos=j;
- tukar(a,pos,i);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement