What is binary search?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
How many maximum number of procedures can we write in one COBOL program?
how to display the dataset information?
Consider the below example call a-test1. -- -- -- a-test1. if a=b perform a-test through a-exit next sentence else if b=c perform c-test through c-exit. if a=d perform d-test through d-exit. a-test. -- -- a-exit. exit. can u tell me what will happen if a=b after looping into a-exit will the control go back to a- test1. will the condition a=d be checked???
how would find total records in files using seqientional
01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i need to get the miuns sign in the result?
01 MOVE 10 TO N 05 PERFOM PARA1 TIMES STOP RUN WAT WILL HAPPEN?? WILL IT RUN INFINITELY OR AN ERROR WIL BE THER BECAUSE NO OF TIMES IS NOT GIVEN??
how many divisions are there in cobol
How do you set a return code to the JCL from a COBOL program?
How can you add a particular field in copybook?
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
file status 00 is checked after opening the file or reading the file
What happens in the background of spool when we submit a job for compilation and execution... This is a recent question in ibm...Kindly help me.....