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

Tell me do array subscripts always start with zero?

836


Which sorting algorithm has minimum number of swaps?

841


Which sorting is best in time complexity?

900


What is data structure and its operations?

792


What are linked lists used for?

907


Define tree edge?

863


Define a binary search tree?

904


What is a subtree?

902


Why arraylist is not efficient for manipulation?

813


What is meant by balanced binary tree?

834


What is difference between hashset and treeset?

991


What is the difference between list and arraylist?

884


Is arraylist a collection?

916


Is arraylist faster than array?

846


Does arraylist shrink?

842