[c++]二分查找算法
摘要:int bsearch(const int* a, int size, int value)
{
assert(a != NULL && size > 0);
if (a == NULL || size < 1)
{
return -1;
}
if (value < a[0] || value > a[size - 1])
{
return -1;
...
阅读全文
posted @ 2010-07-22 20:08
浙公网安备 33010602011771号