二分查找的前提是有序表,思路是若查找的数小于arr[mid],则继续在[low,mid-1]中查找,若大于则在[mid+1,high]中查找,依次类推
#include <stdio.h>
int Binary_Search(int *arr, int n, int data)
{
int low;
int high;
二分查找的前提是有序表,思路是若查找的数小于arr[mid],则继续在[low,mid-1]中查找,若大于则在[mid+1,high]中查找,依次类推
#include <stdio.h>
int Binary_Search(int *arr, int n, int data)
{
int low;
int high;