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
What is the difference between synchronous and asynchronous update?
Explain what is sap script? What is the purpose of sap script?
How did you test the form you developed? How did you taken print?
Which function modules can be used to transfer the data using bdc programming? : abap bdc
What are the different types of views and their definition?
Explain the disadvantages of abap query tool?
What is macro? : abap hr
Define structure in abap data dictionary?
Which FM do you use to find out who is reporting to whom
How to do find it?
How does the interection between the dynpro and the abap/4 modules takes place?
What are the tcodes for performance tuning?
What is the disadvantage of a call by reference?
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?
Explain what is an rfc?