You are viewing a single comment's thread. Return to all comments →
int i,j,k; for(i=1;i<=n-1;i++) { for(j=0;j<=i;j++) { while(arr[j]>arr[i]) { int temp2=arr[i]; arr[i]=arr[j]; arr[j]=temp2; } } for(k=0;k<=n-1;k++) printf("%d ",arr[k]); printf("\n"); }
Seems like cookies are disabled on this browser, please enable them to open this website
Running Time of Algorithms
You are viewing a single comment's thread. Return to all comments →