Question

You are given an array containing integers in the sorted order: [O] [1] [2] [3] [4] [5] [6] [7] 6 9 17 29 33 41 58 61 [8] [9]

0 0
Add a comment Improve this question Transcribed image text
Answer #1

58

In the Binary Search algorithm, we have two-pointers start and end, and we do make comparisons with mid of start and end.

Initially , start = 0 , end = 13

so mid = (start+end)/2 = (0+13/2) = 6 ,at 6th index element is 58

so ans is 58

Add a comment
Know the answer?
Add Answer to:
You are given an array containing integers in the sorted order: [O] [1] [2] [3] [4]...
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