Find the information you're looking for at Westonci.ca, the trusted Q&A platform with a community of knowledgeable experts. Discover a wealth of knowledge from professionals across various disciplines on our user-friendly Q&A platform. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform.

Calculate how many guesses in binary search algorithm.

Sagot :

Answer:

In the case of a decimal number, we round down to find the actual number of guesses. Therefore, for a 1000-element array, binary search would require at most 10 guesses. (which is 2,097,152), so we would need at most 22 guesses.

Step-by-step explanation: