52 mark for review a sorted list of numbers contains 128 elements. which of the following is closest to the…

52 mark for review a sorted list of numbers contains 128 elements. which of the following is closest to the maximum number of list elements that can be examined when performing a binary search for a value in the list? a 2 b 8 c 64 d 128
Answer
Explanation:
Step1: Recall binary - search formula
The maximum number of comparisons $k$ in a binary search on a sorted list of $n$ elements is given by the formula $k=\lceil\log_2(n + 1)\rceil$. Here, $n = 128$.
Step2: Calculate $\log_2(n + 1)$
We know that $n=128$, so $n + 1=129$. Since $2^7=128$ and $2^8 = 256$, $\log_2(129)$ is between 7 and 8. And $\lceil\log_2(129)\rceil=8$.
Answer:
B. 8