(Choose 1 answer)
(See picture)
A. (3, 4, 5, 6, 9}
B. (3, 4, 5, 9, 6}
C. (3, 5, 4, 6, 9)
D. None of the other choices is correct
Apply the insertion sort to the sequence (5, 3, 4, 9, 6}. What the iteration when j = 3?
procedure insertion sort(a1, a2,.. an: real numbers wi for j := 2 to n
begin
i := 1
while aj > a;
i:=i+1
m:= aj
for k: 0 to j-i-1
aj-kaj-k-1
Back
Next
vat fini
Finish
E33