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 / mounesh badiger

we have to check all the elements of the array.so average is
n(size of array)

Is This Answer Correct ?    14 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How efficient is binary search?

468


Does linkedhashset allow duplicates?

432


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 ].

566


what is a balanced tree.

595


Can we store null in arraylist?

473






How is the front of the queue calculated ?

721


What is a matrix?

554


Why do we use stacks?

475


What is homogeneous array?

467


Which are the sorted collections?

558


Why concurrenthashmap is fail safe?

518


What is complete binary tree and almost complete binary tree?

446


Describe the complexity of Quick Sort

552


What is the purpose of tochararray ()?

480


Briefly explain recursive algorithm 50 how do you search for a target key in a linked list?

575