MAD101_-_Test2_-_SU_2024_2075.webp
minhkhai99

MAD101_-_Test2_-_SU_2024_2075.webp

Question: 4
(Choose 1 answer)
procedure Binarysearch(a₁<a₂<... <an, x: integer)
i:=1
j:=n
Given the Binary search algorithm (See picture)
while (i<j)
m:=[(i+j)/2]
if x> am then
If input = 2, 4, 5, 7, 8, 9, 10, 13 and x = 11, after the second time of dividing into sublists, the sublist to be considered is_
else j:=m
i:= m+1
Α. 10, 13
if x = a; then location: = i
Β. 9, 10, 13
else location: = 0

C. 9, 10
D. 10

Thông tin

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

Share this media

Back
Bên trên Bottom