At Westonci.ca, we connect you with the best answers from a community of experienced and knowledgeable individuals. Discover comprehensive answers to your questions from knowledgeable professionals on our user-friendly platform. Experience the convenience of finding accurate answers to your questions from knowledgeable experts on our 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: