completed hackerrank challenge 'insertion sort - part 1'