What is the average number of comparisons needed in a
sequential search to determine the position of an element in
an array of 100 elements, if the elements are ordered from
largest to smallest?

Answer Posted / amit

(n+1)/2
here n= 100
so (100+1)/2
then 50.5 answer

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between data type and data structure?

454


What is a Breadth First Search? Give a few of its applications.

492


Explain the types of linked lists.

550


Is quicksort faster than merge sort?

480


If you have to store one lakh objects, what will be a better option- a hash map or an array list?

818






What do you mean by primary clustering?

561


What is Doubly link list?

547


What exactly is data?

513


What is structured data with example?

474


Which sort is stable?

537


What is the difference between data types and data structures?

453


What is the difference between null and void?

526


What is shell sort in data structure?

472


What will be the output of below code?

598


Why is quicksort so fast?

473