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 difference b/w linear search and binary search?
(how can these search)

Answer Posted / jeyachandran.p

Binary search is an efficient search compared to linear
search.Binary search requires sorted array while linear
search operates on unsorted array.

In binary search ,we looks through half of the list i.e
the element to be search is compared with mid value, if it
equals to mid value,search operation is over.otherwise if
the search element is smaller we have to search in the first
half of the list else we have to look in second half of the
list.

But linear search or sequential search requires an complete
search over the list.As far as ,Binary search is very best
in time and efficiency.It requires O[log n} times but linear
search requires O[n]times.

Is This Answer Correct ?    14 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Structures can contain data only during the runtime of a program (t/f) : abap data dictionary

1368


what is the t-code to link technical and functional operation?

2474


What are the dis-advantages of logical databases? : abap hr

1197


How do you get the number of lines in an internal table? How to use a specific number occurs statement?

1003


What are the different control break statements available inside a loop?

1090


What are logical databases?

1162


how to Create a smart form related to gate pass to be submitted to vendor’s location. This form outputs document number, date, vendors name, address, material details, quantity, unit,and the company logo.

5408


What is new enhancement framework?

1401


What is a batch input session? : abap hr

1216


2)In production what is the user exit?

2027


How many types of views are there? : abap data dictionary

1102


Explain what are the various types of selection screen event?

1120


Explain different types of locks?

1116


What is dialog module?

1140


Explain the properties of selection screen?

1207