Home > Back-end >  A little doubt about binary search and a placeholder
A little doubt about binary search and a placeholder

Time:09-22

Int main ()
{
Int I, n=10;
Int * count=0;
int result;
SeqList R;
,3,9,12,32,41,45,62,75,77 KeyType a []={1}, x=32;
for (i=0; iR [I] key=a, [I].
Result=BinSearch (R, n, x);
If (result> 0)
Printf (" sequence of the first % d % d, find the number for % d \ n ", result, x);
The else
Printf (" had not found! \n");
return 0;
}
Using a binary search, and finally a placeholder FuMingMing no content, why will eventually shows 17?

Such use counter is what come out the result?
And what is the difference between below code? Statistical query below code number is right,,

Bother everybody to help, thank you!

CodePudding user response:

The execution of the above return 0;
The execution of the below return count;

Can be the same?
  • Related