Please Provide Solution We are using Sequential Search to se
Please Provide Solution
We are using Sequential Search to search an array of size n. It is known that the item we are looking for is definitely present in the array. The probability that the item we are looking for is the last one in the array is 1/5, and the probability that the item we are looking for is the next to last one is also 1/5. The probabilities of matching the search key to each of the other items are all equal. If n = 15, counting a comparison as the basic operation, what are the values of the complexity functions for the best case, worst case, and average case? B(15) = W(15) = A(15) = We found that under these conditions when n = 5 the running time for the worst case was 60 nsec (10^-9 sec.). What are the expected running times for the best case, worst case, and average case when n = 5? Best case: t = Worst case: t = Average case: t =Solution
B(15)
best case item we are looking is the first one
= O(1)
time complexity =1
worst case - at the last
time complexity - 15
average case

