MAD101_-_C2_-_FE_-_SU_2023_477.webp
Daviddoo

MAD101_-_C2_-_FE_-_SU_2023_477.webp

  • Media owner Daviddoo
  • Ngày thêm
(Choose 1 answer)
Given the Bubble sort algorithm (See picture)
Procedure Bubblesort(a1,a2,..., an: integer)
If input = 3. 2. 4. 7. 1. 6, 5, find the order of the elements after completing the first pass (i = 1).
A. None of the other choices is correct
B. 2, 3, 4, 1, 6, 5, 7
C. 2, 3, 1, 4, 6, 5, 7
D. 2, 3, 4, 1, 5, 6, 7
E. 2, 3, 1, 4, 5, 6, 7
for i = 1 to (n-1) do for j = 1 to (n-i) do if a, > a+1 then swap(aj, aj+1)
vat fini
Finish
Exll
15

Thông tin

Category
MAD101
Thêm bởi
Daviddoo
Ngày thêm
Lượt xem
1,402
Lượt bình luận
8
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
MAD101_-_C2_-_FE_-_SU_2023_477.webp
File size
46.2 KB
Dimensions
1372px x 594px

Share this media

Back
Bên trên Bottom