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 do you mean by breadth first search (bfs)?
Which is better merge sort or quick sort?
What is a string array?
State the properties of b tree.
How many parts are there in a declaration statement using data structures?
Does stringutils isempty check for null?
What is meant by int?
What is data structure what is need of it?
State the difference between primitive and non-primitive data types?
Why it is important to have aligned addresses? What is the exception generated when there is a misaligned address?
Define right-in threaded tree?
Is selection sort greedy?
How can you insert a node to the beginning of a singly linked list?
What are arrays give example?
what is the difference between singly and doubly linked lists?