What is the average number of comparisons in a sequential
search?

Answer Posted / bipin from utkal university mc

suppose there are five element 23,56,78,12,90
minimum time require means searching element present at
first so it takes only one comparison
maximum time require means searching element present at
last so it takes n No. of comparison(here 5 )

so avarage comarison=(1+n)/2

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the space complexity of bubble sort?

526


What member function places a new node at the end of the linked list?

643


What type of algorithm is binary search?

471


What do u mean by array?

481


What are the advantages and disadvantages of copyonwritearraylist?

635






What happens if we try to insert duplicate key in hashmap?

423


Explain binary tree traversals?

507


What are the advantages of sorting and filtering data?

500


Which collection type is used to maintain uniqueness of data structure?

1020


What is the difference between hashmap and arraylist?

526


What are the types of array operations?

500


What is storage structure in data structure?

513


How do you sort elements in an arraylist?

474


Which is faster hashmap or concurrenthashmap?

470


What are hashmaps good for?

526