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 / poonam

IN sequential search (average case =[1/2(best case)+(wrost case)])...its the formula to calculate the average case of sequential search ...
so best case is when we found the element in first comparison.
worst case is when we found element in 100 comparison.
average case is =1/2(1+100)
ans would be 50.5

Is This Answer Correct ?    11 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many passes does bubble sort need?

500


Is a list an array?

460


Is array a data structure?

508


What do you mean by recursive definition?

513


What is a pseudocode example?

501






Does linked list allow null values?

474


How long does it take to master data structures and algorithms?

675


What are the disadvantages of using collection classes over arrays?

528


How does quick sort work?

540


Why is it important to sort waste?

476


What is circular queue example?

481


What is heap with example?

525


Define an algorithm. What are the types of algorithms?

543


Define a tree?

588


How many types of arrays are there?

524