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 do you find a string is anagram or not?
How do arrays work?
What is push and pop in stack?
What is the difference between arrays sort and collections sort?
What do you mean by overflow and underflow?
What are the goals of data structure?
What is the Insertion Sort Code?.
Is list an array?
Write a program for reversing the Single Linked List?
Can a class have a constructor?
How do you initialize an arraylist?
What should be done in the base case for this recursive problem?
Why it is said that searching a node in a binary search tree is efficient than that of a simple binary tree?
What is binary search tree and explain its time complexity?
What is nsmutablearray?