Recursive C program for Binary search
February 8, 2020
Below is an example Recursive C program to perform Binary –
int binsearch(int low, int high, in a[], X){ int mid; if(low > high){ return(-1); } mid = (low + high) / 2; return(X == a[mid] ? mid : X < a [mid] ? binsearch(low, mid-1, a[], X) : binsearch (mid+1,high,a[],X)) }