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 / shailesh pratapwar
The avrage case complexity of any linear search alogrithm is
n/2.
So we need 50 comparisons to search in 100 elements.
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
Define graph?
What are control structures?
What is an ordered map?
What is difference between linear and non linear data structure?
What is difference between arraylist and list?
Name few classes that implement collection interface?
What is difference between list and array?
Does hashset maintain order?
Define an algorithm. What are the properties of an algorithm? What are the types of algorithms?
How do you find the height of a binary tree?
What is the difference between array list and vector list?
Which interfaces are implemented by abstractsequentiallist?
What is the minimum number of queues needed when implementing a priority queue?
What is stack and queue in data structure?
What is the difference between ienumerable and list?