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

How can we increase the size of an existing PDS to include more no. of modules. I tried the answer posted by Jagan(TSO PDS 'pds name') but did not find it working. The answer posted by kamal i know very well. Please suggest me a answer so that we don't need to delete the existing PDS and still we can change the size as well.

10 Answers  


Explain about Redefines cluse?

3 Answers   iGate,


What is SSRANGE, NOSSRANGE ?

5 Answers  


What is an in line perform? When would you use it? Anything else you wish to say about it.

0 Answers  


if i am reading a file with some 50000 records and moving to a DB2 table and suddenly the program abends in between, is there anyway i could restart from the exact record at which the job failed once the program restarts.

2 Answers   UST,






what happens if we dont close cursor in db2-cobol pgm?

6 Answers  


wht is the use of evalute verb ? how do u declare recfm in cobol and jcl ?

2 Answers   EDS,


can we display comp-3 variables. if we want to display what we have to do . give me one example

6 Answers   CGI, Deloitte,


What is wrong with the following data declaration? 01 W-DATE PIC X(6). 05 DD PIC 99. 05 MM PIC 99. 05 YY PIC 99. (a) Nothing is wrong. (b) Under W-DATE all level 05 items are having a PIC 99 but level 01 has PIC X(6). (c) PIC can't be specified for a group item. (d) DD, MM, and YY are invalid datanames.

6 Answers   Mphasis, TCS,


explain sorting techniques in cobol program?

0 Answers  


what is scope terminator

2 Answers   IBM,


COMP field occupy ?

2 Answers  


Categories