MAD101_-_C1_-_RE_-_SU_2023_591.webp
Hồng Hạnh1

MAD101_-_C1_-_RE_-_SU_2023_591.webp

22
Answer (Choose 1 answer)
Given the Bubble sort algorithm (See picture)
Procedure Bubblesort(a1,a2,..., an: integer)
If input = 3, 2, 4, 1, 6, 5, find the order of the elements in the list after the second pass (i = 2).
for i = 1 to (n-1) do for j = 1 to (n-i) do if a; > a+1 then swap(aj, aj+1)
A. 2, 1, 3, 5, 4, 6
B. 2, 1, 3, 4, 5, 6
C. 2, 3, 1, 5, 4.6
D. 2, 3, 1, 4, 5, 6

Thông tin

Category
MAD101
Thêm bởi
Hồng Hạnh1
Ngày thêm
Lượt xem
1,466
Lượt bình luận
10
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
MAD101_-_C1_-_RE_-_SU_2023_591.webp
File size
47.9 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom