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
Will it create any problem if we add elements with key as user defined object into the treemap?
What is default array size?
Define linked list data structure.
Write a program to sum values of given array.
Explain binary tree traversals?
Is arraylist synchronized?
What is sequential sorting?
How can I learn data structures?
Explain the term binding time?
What is ascending and descending order?
what is the primary advantage of a linked list?
How do you sort a map by key?
What is the default size of an arraylist?
Write the advantage of separate chaining?
What are the four characteristics of algorithms?