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

Can hashmap be sorted?

867


Explain the Linked List

1060


Write a recursive c function to calculate the height of a binary tree.

850


What are the advantages of sorting?

871


What is meant by ordered and sorted in collections?

843


What is peek in stack?

878


Explain the steps to insert data into a singly linked list?

820


Write a program to sum values of given array.

970


How to search binary in a sorted array?

794


Name two algorithms two find minimum spanning tree?

874


how to insert a new node in linked list where free node will be available?

929


What is hashing with example?

877


In what scenario, binary search can be used?

866


Can we increase the size of statically allocated array?

836


What are different types of sorting algorithms?

909