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 / pankaj
(sum of all 1 to 100) - (sum of given numbers)= number missing
for this no comparison required
| Is This Answer Correct ? | 4 Yes | 20 No |
Post New Answer View All Answers
What is the order of selection sort?
Define an algorithm. What are the types of algorithms?
What is the need for path compression?
Why use a tuple instead of a list?
What is the height of an empty tree?
State the merit of linked representation of binary trees?
What is bubble insertion selection sort?
Will this code give error if I try to add two heterogeneous elements in the arraylist? And why?
Does hashmap allow duplicate keys?
What are the types of linked list?
What is a map in programming?
How to fill element (initialize at once) in an array?
What is array traversing?
Explain the uses of b+ tree.
What is frozenset?