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 can i see junk values in dclgen or in hostvariable of comp ?

2554


Differentiate between structured cobol programming and object-oriented cobol programming.

676


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

683


how do you reference the ksds vsam file formats from cobol programs

674


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

752






Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

836


What is the difference between comp and comp-3?

710


What are the various section in data division and briefly explain them.

712


How do you reference the following file formats from cobol programs?

704


i need a small 3d program using inline and outline.

1651


What is length is cobol?

658


example for sub strings ? and refernce modifications whit output pls

1858


what is s000 u4087 error? please give the all error codes in cobol,jcl.

17075


Explain how to differentiate call by context by comparing it to other calls?

696


What is a scope terminator give example?

664