Question: Use the array of integer numbers below to answer the questions that follow it. Assume no early exits for searches. For each question, provide an

Use the array of integer numbers below to answer the questions that follow it.

Assume no early exits for searches.

For each question, provide an exact integer value.

Position 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Value 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90

How many comparisons does a linear search make to find a key value of 80?

How many comparisons does a binary search make to find a key value of 15?

What is the maximum number of comparisons that would be required to not find a key value of 3 using the linear search without early exit?

What is the maximum number of comparisons that would be required to not find a key value of 9000 using the binary search?

If you were to use a bubble sort to re-sort these elements into descending order, how many passes would be required to complete the sort?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!