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
What thread means?
Are hash tables ordered?
What is sorting an array?
Define graph traversals?
Which sorting method is slowest?
Which sorting technique is faster?
Which method will arrange the element of an array in alphabetical order?
Is copyonwritearraylist thread safe?
What are the two traversal strategies used in traversing a graph?
Calculate the efficiency of sequential search?
Differentiate between arraylist and linkedlist.
Which list does not allow duplicates?
Which is the simplest file structure?
Define a queue?
What is comparable interface?