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 null is allowed in hashmap?
What type of algorithm is binary search?
Which is faster hashmap or linkedhashmap?
Is json a data structure?
What are different methods of collision resolution in hashing.
Why do we need linked lists?
How does linkedhashset work internally?
Which interfaces are implemented by printerstatereasons?
Explain binary representation?
Can you dynamically allocate arrays in expanded memory?
What is an object array?
What is a list in data structure?
What are the Advantages and disadvantages of Array?
Explain the priority queue?
What are the differences between b tree and b+ tree?