What is the average number of comparisons in a sequential
search?
Answer Posted / kalyani
Searching an element in an array, the search starts from the first element till the last element the average number of comparisons in a sequential search is (N+1)/2,where N is the size. The number of comparisons will be 1, if element is in the first position and if element is in the last position the number of comparisons will be N.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How is a hashset implemented?
Is array immutable?
What is stack in geography?
Explain binary tree traversals?
Tell me about circular linked list?
Which is more efficient merge sort vs quicksort?
Why quicksort is better than merge sort?
Which is better selection or bubble sort?
How many types of arrays are there in visual basic?
What is non linear data structure with example?
What is the difference between null and void pointer in data structures?
What is difference between hashmap and map?
What is impact of signed numbers on the memory using data structures?
Is hashmap synchronized?
Write an algorithm through which the inserting and deleting of elements can take place in circular queue?