CÂU HỎI 8 (SINGLECHOICE)
If input = 3, 2, 6, 4, 5, 1, find the order of the elements in the list after the third pass (i = 3).
procedure Bubblesort(a,a.....a: integer)
fori 1 to (n-1) do
for j 1 to (n-i) do
if a, > a+ then
swap(aj. a+1)
2, 3, 1, 4, 5, 6
3,2,1,4,5,6
2, 1, 3, 4, 5, 6
1, 2, 3, 4, 5, 6