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 needed in a
sequential search to determine the position of an element in
an array of 100 elements, if the elements are ordered from
largest to smallest?

Answer Posted / sherin

its asked sequential search
if it was binary then dividing array into 2 , then
comparing....100 - 50 - 25 - 12 - 6 - 3 - 1 -then the no.,
i think Dj thought it like that ..

Sequential search is not needed here because the numbers are
ordered , if it was not ordered then 'n' comparisons are
necessary.

question here is not worst case scenario , see its asked
average case ..that too with ordered numbers ...

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does isempty() member method determines?

924


Which is the fastest sorting?

986


What does the term sorting refer to?

1062


Explain Array

961


Can array store heterogeneous data?

828


How do signed and unsigned numbers affect memory?

884


What is a stable algorithm?

929


How can we reverse a singly linked list?

1002


Write an algorithm to find middle element in the linked list.

910


Can arraylist hold different types?

1004


How to get a list of tables, views and columns in firebird database?

892


What are threaded binary trees?

955


What is difference between concurrenthashmap and hashtable?

917


What is list and its types?

889


How do you declare An array of three pointers to chars

860