Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What member function places a new node at the end of the linked list?

1062


Can hashset contain null?

1029


Which sorting is worst?

996


Give the example of validating the parenthesis of expression using stack.

1031


What is static array?

966


What are examples of data structures?

931


What do you mean by linear probing?

1054


Why do we need to use computers to help us sort lists?

923


Does arraylist contain duplicates?

890


Is it possible to insert different type of elements in a stack? How?

909


Why do we use linked lists?

904


Which data structures are applied when dealing with a recursive function?

1141


What is precision?

990


What is binary tree in discrete mathematics?

862


What does quick sort do?

874