List all numbers that you would compare 30 with while search- ing for the number 30 in the sequence {14 23 72 73 76 81 81 91 93 99} using the binary search algorithm. You must use the version of the algorithm that was shown in class. Write all values compared against in the order the comparisons occur including all inequality comparisons and the final equality check. Note that if you compare against a number more than once, you must list it again for each additional comparison. e.g {1,3,7,3}

Algebra & Trigonometry with Analytic Geometry
13th Edition
ISBN:9781133382119
Author:Swokowski
Publisher:Swokowski
Chapter10: Sequences, Series, And Probability
Section10.2: Arithmetic Sequences
Problem 52E
icon
Related questions
Question

6

This is Discreet math please answer questions with proper formatting for proofs

List all numbers that you would compare 30 with while search-
ing for the number 30 in the sequence {14 23 72 73 76 81 84 91 93 99} using
the binary search algorithm. You must use the version of the algorithm
that was shown in class. Write all values compared against in the order
the comparisons occur including all inequality comparisons and the final
equality check. Note that if you compare against a number more than
once, you must list it again for each additional comparison. e.g {1, 3, 7,3}
Transcribed Image Text:List all numbers that you would compare 30 with while search- ing for the number 30 in the sequence {14 23 72 73 76 81 84 91 93 99} using the binary search algorithm. You must use the version of the algorithm that was shown in class. Write all values compared against in the order the comparisons occur including all inequality comparisons and the final equality check. Note that if you compare against a number more than once, you must list it again for each additional comparison. e.g {1, 3, 7,3}
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Algebra & Trigonometry with Analytic Geometry
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
Holt Mcdougal Larson Pre-algebra: Student Edition…
Holt Mcdougal Larson Pre-algebra: Student Edition…
Algebra
ISBN:
9780547587776
Author:
HOLT MCDOUGAL
Publisher:
HOLT MCDOUGAL