What is the average number of comparisons in a sequential
search?
Answer Posted / vivek tiwari
f(n)= 1.Pn + 2.Pn + 3.Pn +...+ N.Pn
where
Pn = 1/N
f(n)= 1.1/N +2.1/N + 3.1/N+....+N.1/N
= (1+2+3+....+N)1/N
= N(N+1)/2N
= (N+1)/2
| Is This Answer Correct ? | 47 Yes | 1 No |
Post New Answer View All Answers
What do you mean by open addressing?
What is comparator interface used for?
What is the function of stack?
Which sorting is best in time complexity?
which is the simplest file structure? (Sequential, indexed, random)
what is the difference between dynamic as well as non - dynamic data structures.
What is an ordered map?
Why sorting is used?
Tell me how to find middle element of linked list in one pass?
Is arraylist reference type?
What is the difference between push and pop?
In an avl tree, at explain what condition the balancing is to be done?
How is the front of the queue calculated in data structure?
What is treemap chart?
What is data structure operations?