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


Please Help Members By Posting Answers For Below Questions

Define an equivalence relation?

644


What is data structure definition?

494


Explain linked list in short.

521


What is adt in data structure with example?

511


How do you find the number of comparisons in bubble sort?

510






What is time complexity of hashmap?

524


Give a real time example of stack

548


How do you assign an address to an element of a pointer array ?

506


How can you implement a stack?

599


What is the difference between Array and Array List ? Explain in brief with example.

560


Explain what is the bucket size, when the overlapping and collision occur at same time?

574


What is a hashers run?

493


how to delete first node from singly linked list?

629


Write the syntax in c to create a node in the singly linked list.

542


What is the default capacity of hashmap?

411