retagged by
733 views
3 votes
3 votes
Assume that a data file has an index consisting of $\text{N}$ items, where $\text{N}$ is large. If a binary search of the index is used to find an item, then, of the following, which best approximates the mean number of comparisons required to locate a specific index entry?
  1. $\text{(N}+1) / 2$
  2. $\text{N(N}-1) / 2$
  3. $\left(\log _2 \text{N}\right)-1$
  4. $\text{N} \log _2 \text{N}$
retagged by

Please log in or register to answer this question.

Answer:

Related questions

8 votes
8 votes
2 answers
3