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
Which is the parent class of abstractqueue class?
Define general trees?
Define non linear data structure.
Write any two principles of gradation of structures.
Define balancing condition for AVL Tree.
an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like. [ I ended up giving about 4 or 5 different solutions for this, each supposedly better than the others ].
how to delete first node from singly linked list?
How can we delete any specific node from the linked list?
Why would we use dynamically allocated arrays vs vectors?
Which sorting technique is best in worst case?
Tell me why can't constant values be used to define an array's initial size
Difference between arrays and linked list?
How can you insert a node in a random location of the linked list?
What are the advantages of linked list?
Define an abstract data type (adt)?