MAD101_-_SU_2024_-_Block_5_-_FE_2635.webp
D

MAD101_-_SU_2024_-_Block_5_-_FE_2635.webp

Kizspy | Question: 18
(Choose 1 answer)
(See picture)
A. (i)
B. (ii)
C. (iii)
D. (iv)
Give a big-O estimate for the number of operations (where an operation is an addition or a multiplication) used in this segment of an algorithm.
k := 0
for i:=1 ton* n
for j := 0 to i - 1 k := k + i* j
end
end
(i) 0(n)
(ii) O(nlogn)
(iii) O(n²)
(iv) O(n4)

Thông tin

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

Share this media

Back
Bên trên Bottom