What is binary search?

Answer Posted / sachin

Prefer when the table size is significantly large.

When the size of the table is large and it is arranged in
some sequence -either ascending or descending on search
field, then BINARY SEARCH would be the efficient method.

Table should be in sorted order of the searching argument.
There should be ASCENDING/DESCENDING Clause.
Index need not be set to 1 before SEARCH ALL.

Compare the item to be searched with the item at the
center. If it matches fine, else repeat the process with
the left or right half depending on where the item lies.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the compute verb? How is it used?

854


Write a program that uses move corresponding.

876


What do you understand by psb and acb?

850


What is the difference between comp and comp-3?

903


In COBOL programming, what is PERFORM? What is VARYING?

874


here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?

7316


Explain how you can characterize tables in cobol?

823


what is search and searchall?what is the diffrence between them?give an best example?

6199


What is the Purpose of POINTER Phrase in STRING command in COBOL?

970


What is length is cobol?

868


What are different data types in cobol?

916


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

629


What is comp-1 and comp-2?

948


What rules are followed by the search verb.

839


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1896