MAD101_-_SP_2025_-_BL3_-_Quiz2_3802.webp
Ngọc Huyền1

MAD101_-_SP_2025_-_BL3_-_Quiz2_3802.webp

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

Thông tin

Category
MAD101
Thêm bởi
Ngọc Huyền1
Ngày thêm
Lượt xem
342
Lượt bình luận
2
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom