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 two-dimensional array?
How does a selection sort work for an array?
What is data structure geeksforgeeks?
What does sorting an array do?
What is merge sort in daa?
What is the difference between data type and data structure?
Why do we use arrays?
Is null allowed in list?
Define secondary clustering?
Which is faster hashmap or treemap?
How can I learn data structures?
Define Data Structures?
What do you understand by doubly linked list?
Why we need cursor implementation of linked lists?
What is the difference between length () and size () of arraylist?