39-612.jpg
Daviddoo

39-612.jpg

  • Media owner Daviddoo
  • Ngày thêm
(Choose 1 answer)
Given the Binary search algorithm (See picture)
Procedure Binarysearch(a₁<a₂<... <an x: integer)
i:=1
j:=n
If input = 2, 4, 5, 7, 8, 9, 10, 13 and x = 8, after the second time of dividing into sublists, the sublist to be considered is
A. 8, 9
while (i<j)
B. 7.8
m:=[(i+j)/2]if x> am then i:= m+1 else j:=m if x = a, then location: = i else location: = 0
C. 8, 9, 10
D. 5, 7, 8

Exit 39
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
39-612.webp
File size
50.4 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom