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
Why is hashmap used?
What are the basic data structures?
How to search binary in a sorted array?
How to create an Array?
What is selection sort with example?
What is the difference between sorting and classifying?
What do you mean by Runtime Error
What is the space complexity of bubble sort?
How remove all from arraylist?
What is binary tree and its types?
What is the time complexity of hashmap get () and put () method?
What exactly is a thread?
Is treeset synchronized?
Which is the parent class of linkedhashset class?
What is unhashable type list?