MAD101_-_C1_-_FE_-_SU_2023_489.webp
Scar89

MAD101_-_C1_-_FE_-_SU_2023_489.webp

  • Media owner Scar89
  • Ngày thêm
Answer (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. 5, 7, 8
B. 7.8
C. 8.9
D. 8, 9, 10
while (i<j)
m:=(i+j)/2]if x> am then i: = m+1 else j:=m if x = a; then location: = i else location: = 0

Exit 26

Thông tin

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

Image metadata

Filename
MAD101_-_C1_-_FE_-_SU_2023_489.webp
File size
65.1 KB
Dimensions
1926px x 906px

Share this media

Back
Bên trên Bottom