CSD201_-_FA_2023_-_RE_1133.webp
S

CSD201_-_FA_2023_-_RE_1133.webp

(44)
(Choose 1 answer)
The following is the main part of selection sort pseudocode:
for i:= 0 to n-2 // large loop
find a[k], where a[k] = min (a[i], a[i+1],...,a[n-1]}if k #i then swap a[i] with a[k]
end for
Consider the list of ten integers below:8, 5, 11, 13, 4, 10, 3, 5, 9, 6
What is the list after the FIRST TWO iterations of the large loop in a selection sort? (sorting from smallest to largest).
A. 3, 4, 11, 13, 5, 10, 8, 5, 6, 9
B. 3, 4, 11, 13, 5, 10, 8, 5, 9, 6
C. 3, 4, 8, 5, 11, 13, 10, 5, 9, 6
D. 3, 4, 11, 13, 10, 5, 8, 5, 9, 6

Thông tin

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

Image metadata

Filename
CSD201_-_FA_2023_-_RE_1133.webp
File size
70.8 KB
Dimensions
1926px x 906px

Share this media

Back
Bên trên Bottom