Home > Software > Mainframe > Cobol
Interview Questions   Tutorials   Discussions   Programs   

Cobol - What is the difference between a binary search and a sequential search?




363
views
asked mar August 3, 2014 12:10 AM  

What is the difference between a binary search and a sequential search?


           

1 Answers



 
answered By Mswami   0  

Sl #

Sequential SEARCH

Binary SEARCH

1

SEARCH

SEARCH ALL

2

Table should have INDEX

Table should have INDEX

3

Table need not be in SORTED order.

Table should be in sorted order of the searching argument. There should be ASCENDING/DESCENDING Clause.

4

Multiple WHEN conditions can be coded.

Only one WHEN condition can be coded.

5.

Any logical comparison is possible.

Only = is possible. Only AND is possible in compound conditions.

6

Index should be set to 1 before using SEARCH

Index need not be set to 1 before SEARCH ALL.

7

Prefer when the table size is small

Prefer when the table size is significantly large.

flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert