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
How to use appendNode() in linkedlist()?
What is the height of an empty tree?
What are the two types of data?
Is binary tree a bst?
Which is faster arraylist or linked list?
What are the advantages and disadvantages of linked list?
Does map extend iterable?
How many types of search algorithms are there?
Why do we use insertion sort?
What is Storage Structures and File Structures? Can you show their relation? What are the examples of each? Thanks
Define primary data structures?
How many null values are allowed in a set?
Does hashmap allow duplicate keys?
What is the best time complexity of bubble sort?
What are the applications of linked list?