MAD101_-_3_-_FA_2023_-_FE_980.webp
Rukia123

MAD101_-_3_-_FA_2023_-_FE_980.webp

  • Media owner Rukia123
  • Ngày thêm
2
(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 = 3, the order of the elements in the list is
A. 2, 3, 4, 7, 1, 6, 5
B. 2, 4, 7, 3, 1, 6, 5
C. 1, 2, 3, 4, 7, 6,5
D. 2, 4, 7, 1, 3, 6, 5
Procedure Insertionsort(a1,a2,..., an: integer)
for i = 2 to n do
j:= 1
while a <a
j:= j+1
temp: = a;for k: i down to j+1
a: ak-1 a := temp


Thông tin

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

Image metadata

Filename
MAD101_-_3_-_FA_2023_-_FE_980.webp
File size
49.5 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom