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 balanced tree.
How expression trees are gets represented in data structure?
Which is the simplest file structure?
What is the space complexity of quicksort?
Which is the best book for data structures and algorithms?
Can we add duplicate keys in a hashmap?
What is array and string?
What is sorting problem?
Define 2-3-4 tree?
What is binary tree example?
If we add enum constants to a sorted collection ( treemap , treeset ), what will be the order in which they will be maintained?
What is sorting with example?
What do you mean by sorting data?
Which is faster hashmap or linkedhashmap?
Is null a binary search tree?