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:
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.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here