MAD101_-_SU_2024_-_Block_5_-_FE_2635.webp
D

MAD101_-_SU_2024_-_Block_5_-_FE_2635.webp

Kizspy | Question: 28 (Choose 1 answer)
(See picture)
A. Only (i)
B. Both of them C. Only (ii)D. None of them
FUOVERFLOW
Which of the following algorithms are recursive?
(i) procedure A(b, n: integers with n ≥ 0)if n = 0 then A(b, n):= 1;else if n mod 2 = 0 then A(b, n) = A(b, n div 2)2 else A(b, n) = b* A(b, n div 2)2
(ii) procedure A(b, n: integers with n ≥ 0)if n = 0 then y: = 1;elsebeginy: = 1;for i:=1 to n y: = y*b;end

Thông tin

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

Share this media

Back
Bên trên Bottom