Binary Search in C++
            bool BinarySearch(int* array, int lo, int hi, int key) {
                if(array != NULL && lo <= hi) {
                    int mid = (lo+hi)/2;
                    if(key < array[mid])
                        return BinarySearch(array, lo, mid-1, key);
                    else if(key > array[mid])
                        return BinarySearch(array, mid+1, hi, key);
                    else
                        return true;
                }
                return false;
            }
            
Source Code