Looking for reliable answers? Westonci.ca is the ultimate Q&A platform where experts share their knowledge on various topics. Discover a wealth of knowledge from professionals across various disciplines on our user-friendly Q&A platform. Our platform provides a seamless experience for finding reliable answers from a network of experienced professionals.

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: