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 a binary search ? and how it is useful in a sorted
internal table?

Answer Posted / saplead.sai

The solution provided by Siddhart is though correct, I
would like to project the solution in a much detailed with
example.
Binary Search Basic rule - Sort the data in Ascending order.
Suppose we have random numbers ranging from 1 to 10000 and
we are searching for 4219. If the data is unorganized and
random....a sequential search would be time consuming.
Hence once the data is sorted in Ascending order. Binary
search would reduce the LOOKUP time.
In the FIRST PASS BINARY search would split the range of 1 -
10000 in to two halfs (i.e 1 - 4999 & 5000 - 10000) and
compares the 4219 which happens to fall in the first half.
In the next pass again two halfs are made and compared.
This way BINARY SEARCH works by dividing either data into
two halfs.
For internal table......or for anything else....this is it

Is This Answer Correct ?    15 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the differences between sap memory and abap memory?

938


how 2 create the normal form by using functional module

2563


Explain what are the events in screen programming?

973


What is sap script? Describe its components.

1042


Can you define a field without a data element?

931


What is use of transparent table in abap? How it is different from pool tables?

1252


What are logical data bases used in hr module? : abap hr

1253


What is pretty printer?

994


When a program is created and need to be transported to prodn does selection texts always go with it? If not how do you make sure? Can you change the cts entries? How do you do it?

996


What is Transactional based Application & Role based Application?

1504


What is buffering allowed but switched off?

1313


What is sequence of event triggered in report?

991


What is a variable in the sap abap?

1008


Explain the advantages and disadvantages of different types of bdc's?

1046


Which bdc you prefer? : abap bdc

1268