Question

About how many comparisons would the binary search makes if the list is of length 1 million and the search item is not in the
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution

Question 17

20 comparisons

Question 18

O(nlog2n),O(nlog2n)

Explanation

17)

An ordered array of one billion elements can be searched using no more than 20 comparisons using a binary search.

Hence Answer is 20 comparisons

---

18)

In merge sort it does not matter if the data is sorted / random/reversed as Therefore the time complexity of the merge sort is always the O(n logn) for any case.

---

all the best

Add a comment
Know the answer?
Add Answer to:
About how many comparisons would the binary search makes if the list is of length 1...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT