asked 80.7k views
3 votes
Calculate how many guesses in binary search algorithm.

1 Answer

5 votes

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.

Explanation:

answered
User Naya
by
8.5k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.