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 is hash value of a string?

880


How many sorting algorithms are there?

981


What is a spanning tree?does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?

886


What is difference between hashmap and hashset?

956


Explain how to find 3rd element from end in a linked list in one pass?

845


What do you mean by the term “percolate up”?

940


What is the difference between array and list?

899


Can arraylist have duplicates?

909


What's the difference between an array and vector?

872


What is the need for extendible hashing?

958


What data structure underlies a python list?

930


What is integer max_value?

849


What is Jagged Arrays?

950


What do you mean by garbage collection?

937


What is array simple?

909