Insertion sort algorithm
// Place b[k] in its sorted position in b[0..k]
int temp= b[k]; //Save b[k] in temp
// Inv: b[0..k] is sorted except for position b[h], temp <= b[h+1..k]
while (h != 0) && b[h-1]>=temp) {
// Note: {b[0..h-1] <= temp <= b[h+1..k]}