The average successful search time for sequential search on 'n' items is
A. | n/2 |
B. | (n-1)/2 |
C. | (n+1)/2 |
D. | log (n)+1 |
Answer : C Explanation : If the search key matches the very first item, with one ocmparision we can terminate. If it is second, two comparisons , etc. So, average is (1+2+...+n)/n .i.e. (n+1)/2 |
|
Option: A Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. |