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

Which is faster array or arraylist?

465


Define disjoint set adt?

532


Can treemap have duplicate values?

483


How can avl tree be useful in all the operations as compared to binary search tree?

474


What is heap with example?

517






How can I learn data structures?

520


How can you correct these errors?

501


Explain singly linked list in short.

547


What are the advantages and disadvantages of linked list over array?

473


How do you sort in ascending order in arraylist?

497


What is bubble insertion selection sort?

482


Can arraylist contain duplicates?

490


What is data structure and its operations?

469


How can you represent a linked list node?

544


What are examples of data structures?

506