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 member function places a new node at the end of the linked list?
Can hashset contain null?
Which sorting is worst?
Give the example of validating the parenthesis of expression using stack.
What is static array?
What are examples of data structures?
What do you mean by linear probing?
Why do we need to use computers to help us sort lists?
Does arraylist contain duplicates?
Is it possible to insert different type of elements in a stack? How?
Why do we use linked lists?
Which data structures are applied when dealing with a recursive function?
What is precision?
What is binary tree in discrete mathematics?
What does quick sort do?