void insertion_sort(int* arr, int len)
{
int i, j, si, swp;
for(i = 0; i < len - 1; i++)
{
si = i;
for(j = i + 1; j < len; j++)
{
if(arr[j] < arr[si])
si = j;
}
if(si != i)
{
swp = arr[si];
memmove(&arr[i + 1], &arr[i], (si - i) * sizeof(int));
arr[i] = swp;
}
}
}