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

i have a variable block which is used in my cobol program as input file having records of 4080 after compilation while runing the program im getiing file attribut mismatch and it is saying tht the record length of the file is 4084 can any one knw the answer how to reslove it ?

2 Answers  

What is a scope terminator? Give examples.

2 Answers  

write a program to eliminate duplicate records in a input file and send them to output file.

2 Answers   IBM,

Should I use STOP RUN in the sub program??why?

6 Answers   Xansa,

what is the difference between perform varying and perform until

4 Answers   TCS,

How to Write the RESTART Logic Using COBOL?

4 Answers   Syntel, L&T, GalaxE, TCS,

How many types of sorts are there in cobol?

5 Answers   Cap Gemini,

Can you REWRITE a record in an ESDS file? Can you DELETE a record from it?

6 Answers   Mphasis, Wipro, IBM, ABC,

maximum of how many screens we can open in emulator

2 Answers  

Consider the following: 77 A PIC 9(10) 77 B PIC 9(10) 77 C PIC 9(19) MULTIPLY AB BY B GIVING C Which of the following is true ? (a) The execution of the above may result in size error. (b) The execution of the above will result in size error. (c) The definition of C is invalid resulting in compilation error. (d) No error will be thee and the program would proceed correctly.

4 Answers   TCS,

I had 100 records and i want to execute last three records by using cobol programming?what will be coding?

4 Answers   IBM,

Write the syntax of a two dimensional array?

8 Answers   Honeywell, Xansa,