Question

2. Search (87, 75, 98, 100, 82 for 100 using sequential search. Show your work. 87 75 98 100 82

example:

Search (87, 75, 98, 100, 82) for 100 Indexi 0 1 | 2 | value 87 75 98 100 82 100 100 return 3

arch (87, 75, 98, 100, 82 1 for 12. dex 012 3 4 lue 87 75 98100 82 Not found return-

media%2F7d9%2F7d92a131-d9ff-4922-b4ad-25


| {2,4,6,7,8,9,10,12,2 for10. 4 6 7 8 9 10 12 20 Hle index: (0 +8) a 10/ ldle index : (5+8)/2-6 ro==10 84 tO return 6.


Search (2,4,6,7,8,9,10,12,20] for 1 index 0 1 2 3 45 6 7 value 2 4 67 8 9 10 12 middle index: (0+8) /2 84 midd le index: (0+3

0 0
Add a comment Improve this question Transcribed image text
Answer #1
key index array[index] match
100 0 87 No
100 1 75 No
100 2 98 No
100 3 100 Yes

So, Key found at index 3.

Add a comment
Know the answer?
Add Answer to:
example: 2. Search (87, 75, 98, 100, 82 for 100 using sequential search. Show your work....
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