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

Answer Posted / boxee

binary search is fast because
it check the element mid
is element is less
it set the beg
mid=(beg+end)/2;
if(value>a[mid])
{
beg=mid+1;
}
else
{
end=mid-1;
}

Is This Answer Correct ?    23 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do you reference the fixed unblock file formats from cobol programs

712


How do you reference the fixed block file formats from cobol programs

705


1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

1614


How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?

2098


How do u write test cases?

1638






What is a scope terminator give example?

657


What is the difference between next sentence and continue in cobol programing language?

712


What are the different open modes available in cobol?

721


What is the difference between structured cobol programming and object alternativelyiented cobol programming?

709


How arrays can be defined in COBOL?

663


HOw can I get the negative sign while deduct high value from low value

1790


What is the problem of ordered sequential files access?

702


What are the different rules to perform a Search?

618


What do you understand by psb and acb?

665


How are the next sentence and continue different from each other?

766