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 an equivalence relation?
What is data structure definition?
Explain linked list in short.
What is adt in data structure with example?
How do you find the number of comparisons in bubble sort?
What is time complexity of hashmap?
Give a real time example of stack
How do you assign an address to an element of a pointer array ?
How can you implement a stack?
What is the difference between Array and Array List ? Explain in brief with example.
Explain what is the bucket size, when the overlapping and collision occur at same time?
What is a hashers run?
how to delete first node from singly linked list?
Write the syntax in c to create a node in the singly linked list.
What is the default capacity of hashmap?