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 not there, if the elements are completely unordered?
Answer Posted / poonam
IN sequential search (average case =[1/2(best case)+(wrost case)])...its the formula to calculate the average case of sequential search ...
so best case is when we found the element in first comparison.
worst case is when we found element in 100 comparison.
average case is =1/2(1+100)
ans would be 50.5
| Is This Answer Correct ? | 11 Yes | 5 No |
Post New Answer View All Answers
What is a circular singly linked list?
What is default array size?
What is meant by strongly connected in a graph?
How to get the index of an array element?
What is an acyclic graph?
By Which algorithm, the 8 queens problem is solved?
What is the main advantage of a linked list?
Differentiate linear from a nonlinear data structure?
What is a height of a tree?
Should I use hashmap or hashtable?
Define parent node?
Is bubble sort adaptive?
What does isempty() member method determines?
What is heap and its types?
How do you get placements?