Average Number of comparisons in a Sequential Search
807589Jul 21 2008 — edited Jul 21 2008I have a programming assignment due that performs a sequential search on an array of integers. I have it finding values based on user prompts. It either finds the number and gives its position or a message saying it is not in the list. It also gives the max and min values. Here is where I am drawing a blank...I am supposed to also show the number of comparisons the search routine did based on the return value, but I can't think of how it should work conceptually. Any ideas?