sort implementation def insertion_sort(low, high): for cur in range(low + 1, high): for i in range(cur - 1, low - 1, -1): if nums[i] > nums[i + 1]: nums[i], nums[i + 1] = nums[i + 1], nums[i] else: break