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...

The element being searched for is not found in an array of
100 elements. What is the average number of comparisons
needed in a sequential search to determine that the element
is not there, if the elements are completely unordered?

Answer Posted / poonam

IN sequential search (average case =[1/2(best case)+(wrost case)])...its the formula to calculate the average case of sequential search ...
so best case is when we found the element in first comparison.
worst case is when we found element in 100 comparison.
average case is =1/2(1+100)
ans would be 50.5

Is This Answer Correct ?    11 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use appendNode() in linkedlist()?

1094


What is the height of an empty tree?

957


What are the two types of data?

991


Is binary tree a bst?

912


Which is faster arraylist or linked list?

919


What are the advantages and disadvantages of linked list?

874


Does map extend iterable?

947


How many types of search algorithms are there?

883


Why do we use insertion sort?

861


What is Storage Structures and File Structures? Can you show their relation? What are the examples of each? Thanks

2549


Define primary data structures?

986


How many null values are allowed in a set?

900


Does hashmap allow duplicate keys?

1012


What is the best time complexity of bubble sort?

923


What are the applications of linked list?

871