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 inheritance write a program to show use of inheritance?

1086


What is static in oop?

1023


Can a varargs method be overloaded?

1037


What is polymorphism explain its types?

1098


Is data hiding and abstraction same?

966


i got a backdoor offer in process global,Bangalore..Can i work with it?

2790


Explain the advantages of inheritance.

1073


How do you achieve runtime polymorphism?

991


What are the 4 pillars of oop?

1086


What does I oop mean?

1020


What is a class and object?

1001


Why do we use encapsulation in oops?

970


What is oops in simple words?

1032


What is a class oop?

954


Can we define a class within the interface?

986