Insertion Sort

PHOTO EMBED

Thu Jan 13 2022 18:47:14 GMT+0000 (UTC)

Saved by @yaminisingh #c++

void insertionsort(int A[], int size){
  int i, j;
  for(i=1; i<size; i++){
    key= A[i];
    j=i-1;
    
    while(j>=0 && A[j]> key){
      A[j+1]= A[j];
      j=j-1;
    }
    A[j+1]= key;
  }
}
content_copyCOPY