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 do you mean by open addressing?

1063


What is comparator interface used for?

1124


What is the function of stack?

892


Which sorting is best in time complexity?

1010


which is the simplest file structure? (Sequential, indexed, random)

1328


what is the difference between dynamic as well as non - dynamic data structures.

1016


What is an ordered map?

973


Why sorting is used?

991


Tell me how to find middle element of linked list in one pass?

958


Is arraylist reference type?

989


What is the difference between push and pop?

1157


In an avl tree, at explain what condition the balancing is to be done?

1009


How is the front of the queue calculated in data structure?

926


What is treemap chart?

933


What is data structure operations?

1082