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