Binary search algorithm in C source code
#include<stdio.h>
#define OK 1
#define ERROR 0/*BinarySearch Algorithm*/
int binarySearch(int e, int arr[], int lo, int hi)
{
int mi;
if(lo < hi)
{
mi = (lo + hi) / 2;
if(e
原创
2015-10-22 22:32:34 ·
508 阅读 ·
0 评论