Question: 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

 We are using Sequential Search to search an array of size

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/3, and the probability that the item we are looking for is the next to last one is also 1/3. 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) = we found that under these conditions when n = 20, the running time for the worst case was 100 nsec (109 sec.). What are the expected running times for the best case, worst case, and average case when n = 15? Best case: t= Worst case: t= Average case: t=

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!