Question: please explain steps, thank you. 3. Consider the sorting algorithm shown below. procedure sort( a , ..., , : real numbers with n 2 2)

please explain steps, thank you.
3. Consider the sorting algorithm shown below. procedure sort( a , ..., , : real numbers with n 2 2) for j = 2 ton i = 1 while a > i :=i+1 endwhile m = a for k := 0 to j-i-1 Ok:= 0 -1 endfor a:=m endfor {ag, ..., an is in increasing order} a) Give the big-o classification of the function b) Consider the following list, where 66 is in position 1 of the list: 66, 22, 33, 11, 55, 44 Give the contents of the list after each of the first four passes used by the algorithm. Pass 1: Pass 2: Pass 3: Pass 4: c) Consider the following list, where 66 is in position 1 of the list: 66, 55, 44, 33, 22, 11 Give the contents of the list after each of the first four passes used by the algorithm. Pass 1: Pass 2: Pass 3: Pass 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
