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
How to reference all the elements in a one-dimension array?
Explain the uses of matrix with an example?
Can we store null in arraylist?
How to find 3rd element from end in a linked list in one pass?
How does hashset work internally in java?
How do you sort an array in descending order?
What is the difference between a push and a pop?
How do you clear a stack?
What are the types of data structures?
What is a hash index?
What is a concurrenthashmap?
What is difference between hashset and linkedhashset?
Questions related to arrays, such as given a 2 integer array, find the common elements.
What is array in data structure with example?
What is adt in data structure?