CSD201_-_1_-_FA_2023_-_FE_1030.webp
H

CSD201_-_1_-_FA_2023_-_FE_1030.webp

(Choose 1 answer)
The following is the main part of bubble sort pseudocode:
do
swapped := false for i:= 0 to n-2 if a[i] > a[i+1] then swap(a[i],a[i+1])swapped := true end if end for while swapped Consider the list of ten integers below:6, 3, 9, 10, 1, 8, 0, 2, 7, 5
What is the list after the FIRST iteration (for i = 0 to n-2) in a bubble sort? (sorting from smallest to largest).
A. 3, 6, 9, 8, 1, 0, 2, 7, 5, 10
B. 3, 6, 9, 0, 1, 8, 2, 7, 5, 10
C. 3, 6, 9, 1, 8, 0, 2, 5, 7, 10
D. 3, 6, 9, 1, 8, 0, 2, 7, 5, 10


Exit 21

Thông tin

Category
CSD201
Thêm bởi
happy_smile1
Ngày thêm
Lượt xem
3,849
Lượt bình luận
28
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
CSD201_-_1_-_FA_2023_-_FE_1030.webp
File size
55 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom