You are required to investigate the number of comparisons that take place during the execution of an insertion sort. Given a list of ?N unsorted integers, use insertion sort to count the number of comparisons that it takes to arrive at the sorted list. Your insertion sort should execute from left to right.
Function specifications
Argument(s):
Return:
### START FUNCTIONdef insertion_sort(integers):
### END FUNCTION
integers = [15, 1, 2, 16, 12, 16, 9, 2, 0, 11]insertion_sort(integers.copy())
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here