Question: Consider the following reversed insertion sort implementation which prints the contents of the list at the start of each inner iteration: def rev_insertion_sort (lst) for

Consider the following reversed insertion sort implementation which prints the contents of the list at the start of each inner iteration: def rev_insertion_sort (lst) for i in range(1, len(lst)): for j in range(i, 0, -1): print (1st) # print list contents if lst[jl > lst[j-1]: 1st [j-1], lst[jl - 1stlj], lst[j-1] else: break WP2 Show the list contents, in order, displayed by all calls to print when rev_insertion_sort is called with the input list [2, 1, 3, 4, 5]. The first output is already filled in for you; you may not need all lines
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
