MAD101_-_C3_-_SU_2023_-_FE_491.webp
B

MAD101_-_C3_-_SU_2023_-_FE_491.webp

(Choose 1 answer)
Given the Insertion sort algorithm (See picture)
Procedure Insertionsort(a1,a2,..., an: integer)
for i = 2 to n do
j:= 1
If input = 3, 2, 4, 7. 1. 6. 5, after running the outer loop with i = 5, the order of the elements in the list is
while a <a
j:= j+1
A. 1, 2, 3, 4, 7, 5, 6
temp: = a
for k: i down to j+1
B. 1, 2, 3, 4, 7, 6, 5
a: a-1
C. 1, 2, 3, 7, 4, 6, 5
a := temp
D. 1, 2, 3, 4, 6, 7,5
fini
vt
Finish
Exll
11

Thông tin

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

Image metadata

Filename
MAD101_-_C3_-_SU_2023_-_FE_491.webp
File size
46.7 KB
Dimensions
1372px x 594px

Share this media

Back
Bên trên Bottom