MAD101_-_SP_2024_-_FE_1568.webp
ThuyHoa2000

MAD101_-_SP_2024_-_FE_1568.webp

(Choose 1 answer)
Given the Insertion sort algorithm (See picture)
procedure Insertionsort(a1,a2,...,an: integer)
fori 2 to n do
j: = 1
while a₁ < a₁j:=j+1
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
temp: = a₁for k := i down to j+1 ax:= ak-1 a := temp
36/50-CAP
<
>
A. 2, 4, 7, 3, 1, 6, 5
B. 2, 3, 4, 7, 1, 6, 5
C. 1, 2, 3, 4, 7, 6, 5
D. 2, 4, 7, 1, 3, 6, 5


Q: 38

Thông tin

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

Image metadata

Filename
MAD101_-_SP_2024_-_FE_1568.webp
File size
189.4 KB
Dimensions
1920px x 892px

Share this media

Back
Bên trên Bottom