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

Will it create any problem if we add elements with key as user defined object into the treemap?

878


What is default array size?

981


Define linked list data structure.

952


Write a program to sum values of given array.

991


Explain binary tree traversals?

883


Is arraylist synchronized?

949


What is sequential sorting?

863


How can I learn data structures?

904


Explain the term binding time?

896


What is ascending and descending order?

823


what is the primary advantage of a linked list?

1311


How do you sort a map by key?

815


What is the default size of an arraylist?

893


Write the advantage of separate chaining?

897


What are the four characteristics of algorithms?

834