摘要:
1 #include 2 using namespace std; 3 4 5 void Insertion_Sort(int a[],int n) 6 { 7 if (n == 1) 8 exit(1); 9 for (int k = 1; k = 0 && a[j] > x) 14 { 15 a[j... 阅读全文
摘要:
1 #include 2 using namespace std; 3 4 5 int Binary_search(int *a, int p, int r, int x) 6 { 7 if (p > r) 8 return false; 9 int midpoint = (p + r) / 2; 10 if (a[midpoint]... 阅读全文