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

What is abstraction oop?

1078


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

2460


Why is oop useful?

1095


When not to use object oriented programming?

1092


can we make game by using c

4128


What is destructor example?

1040


What is oops and its features?

1072


What is the point of polymorphism?

1032


2. Give the different notations for the class.\

2151


What are the 3 principles of oop?

1112


• What are the desirable attributes for memory managment?

2221


What is use of overloading?

1131


What is encapsulation and abstraction? How are they implemented in C++?

1124


What is the oops and benefits of oops programming?

968


What is difference between pop and oop?

1156