MAD101_-_FA_2023_-_FE_979.webp
Choso87

MAD101_-_FA_2023_-_FE_979.webp

  • Media owner Choso87
  • Ngày thêm
2
(Choose 1 answer)
Given the Bubble sort algorithm (See picture)
procedure Bubblesort(a1,a2,..., an: integer)
If input = 3, 2, 6, 4, 5, 1. find the order of the elements in the list after the third pass (i = 3).
for i = 1 to (n-1) do for j = 1 to (n-i) do if a, > a+1 then swap(aj, aj+1)
A. 3, 2, 1, 4, 5, 6
B. 2, 1, 3, 4, 5, 6
C. 2, 3, 1, 4, 5, 6
D. 1, 2, 3, 4, 5, 6


Thông tin

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

Image metadata

Filename
MAD101_-_FA_2023_-_FE_979.webp
File size
48.9 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom