Q14.webp
M

Q14.webp

  • Media owner Miwa88
  • Ngày thêm
Kizspy | Question: 14
(Choose 1 answer)
Given the Insertion sort algorithm (See picture)
If input 7, 2, 4, 3, 1, 6, 5, after running the outer loop with
i = 4, the order of the elements in the list is.
procedure Insertionsort(a1, a2.....an: integer)
fori 2 to n do
j: = 1
while a;<a
j: =j+1
temp: = a;
for ki down to j+1
akak-1
a; := temp
A. 2, 3, 4, 7, 1, 6, 5
B. 2, 4, 7, 3, 1, 6,5
C. 2, 4, 7, 1, 3, 6,5
D. 1, 2, 3, 4, 7, 6,5

Thông tin

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

Share this media

Back
Bên trên Bottom