def insertion(a, n)
  /a is Array and n is a.length/
  for i in 1 .. n-1
    key = a[i]
    j = i-1
   / print(a)/
   / print "\n"/
    while j >= 0 and a[j] > key
      a[j+1] = a[j]
      a[j] = key
      j -= 1
    end
  end
  return a
end

