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
How many passes does bubble sort need?
Is a list an array?
Is array a data structure?
What do you mean by recursive definition?
What is a pseudocode example?
Does linked list allow null values?
How long does it take to master data structures and algorithms?
What are the disadvantages of using collection classes over arrays?
How does quick sort work?
Why is it important to sort waste?
What is circular queue example?
What is heap with example?
Define an algorithm. What are the types of algorithms?
Define a tree?
How many types of arrays are there?