text: // INSERTION SORT
  
  #include<stdio.h>
  
  int main(){
  
    int i,j,s,temp,a[1500000];
  
    //printf("Enter total elements: ");
    //scanf("%d",&s);
  
    //printf("Enter %d elements: ",s);
    //for(i=0;i<s;i++)
    //    scanf("%d",&a[i]);
  
    s = 1500000;
    int t = s;
    for (i=0; i<s; i++) {
      a[i] = t--;
    }
  
    for(i=1;i<s;i++){
        temp=a[i];
        j=i-1;
        while((j>=0) && (temp<a[j])){
        a[j+1]=a[j];
            j=j-1;
        }
        a[j+1]=temp;
    }
  
    printf("After sorting: ");
    for(i=0;i<s;i++)
        printf(" %d",a[i]);
  
    return 0;
  }
  