1. How many comparisons does each of the following search algorithms make before discovering that 45 is not present in the array given in the previous exercise? a. Linear (sequential) search b. Binary...


1. How many comparisons does each of the following search algorithms make before discovering that 45 is not present in the array given in the previous exercise?


a. Linear (sequential) search


b. Binary search


2. Consider the array of integers 2 6 9 14 18 22 27 33 44 47 51 53. List the integers that a search of this array examines, in the order that they are considered, when searching for 10 by using the following:


a. Linear (sequential) search


b. Binary search


Stop the search as soon as you either find 10 or know that 10 is not in the array. Show how you arrived at your answer.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here