a) Describe the linear search and binary search algorithm for finding an integer in a list of integers in increasing order.

b) Compare the worst-case time complexities of these two algorithms.

c) Is one of these algorithms always faster than the other (measured in terms of comparisons)?

Solution

Step 1:

Here we have to describe the linear search and binary search algorithm for finding an integer in a list of integer in increasing order.also we have to compare the time complexities of those two algorithms.And we have to check is one of these algorithm is always faster than other or not.