DATA STRUCTURE
Programming and Technical
Programming
Technical
The element being searched for is not found in an array
of 100 elements. What is the average number of
comparisons needed in a sequential search to determine
that the element is no
Read Solution (Total 8)
-
- 100 because it had already said that element is not found
- 11 years agoHelpfull: Yes(4) No(1)
- (1+2+3+......100)/2*100=50.5 ~=51
- 11 years agoHelpfull: Yes(2) No(1)
- as it is said that no element is found means
the search go through every element(i.e.100)
so ,it compares 100 hundred elements...
if it founds the element then we do
(n+1)/2 = (100+1)/2 = 50.5~51
- 10 years agoHelpfull: Yes(1) No(0)
- i m still not clear with d ans
- 10 years agoHelpfull: Yes(1) No(0)
- which is the rite one 100 or 51?
- 11 years agoHelpfull: Yes(0) No(0)
- (100/2)=50.5 ~= 51
- 10 years agoHelpfull: Yes(0) No(0)
- 100-1/2; its avg find out no
- 10 years agoHelpfull: Yes(0) No(1)
- no doubt the ans is 100..
case best case worst case avg case
1.item is present 1 n n/2
2.not present n n n - 9 years agoHelpfull: Yes(0) No(0)
DATA STRUCTURE Other Question