What is binary search?

Answers were Sorted based on User's Feedback

What is binary search?..

Answer / 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

What is binary search?..

Answer / ravi

Binary search...sequential search..must be in an sirted
order..it divides the table in to 2 parts

Is This Answer Correct ?    2 Yes 1 No

What is binary search?..

Answer / vidhya

Serial search is most cost-effective up to 70 rows, If the
table has more than 70 rows then Binary search is effecient.
The table should be in ascending or descending order

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More COBOL Interview Questions

which of the following can be used as a check protection symbol a.Z b.S c.* d.+

2 Answers   TCS,

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. what would be the value of yyy

13 Answers   HSBC,

77 a pic x(4) value '1234' -----> instead of this 'abcd' 77 b pic 9(4) value zeros. move a to b what is the answers for both cases? IS it possible? Give me elementary move rules briefly......

8 Answers  

How do you compile cobol program..?

1 Answers  

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

0 Answers   CDC,

how would you resolve sb37 and SE37?

2 Answers   Hewitt,

The following entries appear in the WORKING-STORAGE SECTION: 01 DATE-TODAY. 05 YY PIC XX VALUE "90". 05 MM PIC XX VALUE "12". 05 DD PIC XX VALUE :31". 01 DATE-EDIT PIC XX/XX/XX. MOVE DATE-TODAY TO DATE-EDIT. (a) 901231 (b) 90/12/31 (c) 31/12/90 (d) 311290

4 Answers   TCS,

should I use Go back in the main program ? Yes we can use Go back in main program as well.

2 Answers   Xansa,

What is the difference between static call & Dynamic call?

2 Answers   TCS, CSC,

What is the LINKAGE SECTION used in COBOL?

0 Answers   UGC Corporation,

In my table having 3000 Records. How can I delete the 500th row? (we don't know what is data inside the table)

2 Answers   Keane India Ltd,

diffrence between z(2) and z9(2)

4 Answers   Cap Gemini,