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

should we use linear search or binary search if elements
are placed in random order or mixed?in both cases? i need a
little bit detail ans?thnks

Answer Posted / pavan

binary search tecqnique is applicable only to sorted
elements because we find the mid value and then cmp it with
the key and if the key is greater than the mid value then
we scan on towards the right else towards the left
so,hencefort itwe should make use of linear search when the
elements r not sorted

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is class defined?

1208


Why do we use class?

1146


What is multilevel inheritance explain with example?

1203


to find out the minimum of two integer number of two different classes using friend function

2184


What is polymorphism and why is it important?

1099


Give two or more real cenario of virtual function and vertual object

2364


Why is polymorphism used?

1087


Can a varargs method be overloaded?

1156


Write a c++ program to display pass and fail for three student using static member function

3463


What is encapsulation selenium?

1075


write a C++ program for booking using constructor and destructor.

2591


Why do we use polymorphism?

1129


What does <> mean pseudocode?

1261


What are the three main types of variables?

1178


What is overloading in oop?

1048