What is the difference between binary search and sequential search?

Sharad Jaiswal
Sharad Jaiswal

Posted On: Feb 22, 2018

 

In binary search, the table is divided into two halves and the key values in the table will be arranged in ascending or descending order. When the table is split into two, it becomes easier to search for equal to, greater than or less than conditions until the element is found in the table. The binary search is preferred for more tables and SEARCH ALL is used for binary searching.

In sequential search, the elements are in random positions because they are searched from top to bottom and not in a specific direction. As such they don’t follow a specific sequence. A sequential search is conducted for a lesser number of tables and SEARCH command is used here.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Cobol interview questions

    What is COBOL?

    In 1959, the US Department of Defence formed CODASYL (Conference on Data Systems Language). CODASYL was formed with the..

    Cobol interview questions

    Write some characteristics of COBOL as means of business language.

    COBOL is a dominant programing language that has aided business users since few decades. Following are the features of..

    Cobol interview questions

    What are different data types in COBOL?

    COBOL supports three data types in it programming structure. They are- Alpha-numeric (X) Alphabetic (A,B,C) Numeric (1,..