Insertion sort

<source lang="java"> void insertion(int a[], int size) { int i, j, aux; for (i = 1; i < size; i++) { aux = a[i]; j = i - 1; while (j >= 0 && a[j] >= aux) { a[j + 1] = a[j]; j--; } a[j + 1] = aux; } } </source>