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
What is difference between tree and binary tree?
What is b tree in data structure?
Are hash tables ordered?
Define terminal nodes in a tree?
Can we add duplicate keys in a hashmap?
how to delete first node from singly linked list?
how to insert a new node in linked list where free node will be available?
What is a static structure?
If I try to add enum constants to a treeset, what sorting order will it use?
What is complete binary tree in data structure?
Is map a data structure?
What is a concurrenthashmap?
What is the difference between hashset and arraylist?
What are the applications of b-tree?
Which sorting is best and why?