CÂU HỎI 26 (SINGLECHOICE)
In the bubble sort algorithm
procedure bubble sort (a1, a2, ..., an: integers)
for i: 1 ton-1
for j: = 1 to n - i
if aj > aj+1 then
swap(aj, aj+1)
if the input is the list
{4, 2, 1, 3}
How many swaps are used?
4
5
3
FUQ Jone of the other choices is correct