Sequential Search Question:
a) Derive an exact formula in n (not big O) for the average number of target-to-element comparisons for successful searches on an array of size n, assuming that all possibilities of successful match are equally like.Show your work
b) Derive an exact formula in n (not big O) for the average number of comparisons for failed search on an array of size n, assuming equal likelihood of failure at all possible failure locations?
c) Under what conditions would the modified sequential search be better than the regular sequential search? Explain.