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

What is the significance of hide?

1006


Where the payroll results are stored

2377


What are the different types of views and their definition?

1116


Is sap xi intended to replace ale?

1093


What are the two ways for restricting the value range for a domain ?

1211


What is an update task? : abap modularization

1070


It is not possible to create an abap/4 program, which contains only subroutines. State true or false. : abap modularization

1356


What is processing class, where we do them and why? : sap abap hr

1140


Lock objects and what are parameters of ENQUEUE FM?

1788


What is modularization and its benefits?

1022


What is meant by authorization? : sap abap hr

1175


Can a filed occur in several field groups? : abap modularization

1112


What is an Open Item in SAP? How will you find an Open Item in SAP?

1081


What is collective search help? : sap abap data dictionary

1019


what is the exact code that shoud be implimented in sap note

2496