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 / ntrphanikumar
100 comparisions
since element is not there and the data is unordered we need
to compare with each and every element
| Is This Answer Correct ? | 50 Yes | 7 No |
Post New Answer View All Answers
How hashmap increases its size?
How do stacks work?
Two linked lists are given, find out the sum of them without altering the linked list?
Difference between arrays and linked list?
Define an algorithm. What are the properties of an algorithm? What are the types of algorithms?
What is the height of an empty tree?
How does the bubble sort work?
Which interface provides the capability to store objects using a key-value pair?
Why do we use insertion sort?
Describe queue operation.
Is array a data structure?
Tell me can the size of operator be used to tell the size of an array passed to a function?
How is the front of the queue calculated ?
Can we apply binary search algorithm to a sorted linked list, why?
How do you sort an array in descending order?