摘要:
1 #include 2 using namespace std; 3 4 int BinarySearch(int arr[],int begin,int end,int num) 5 { 6 if(arr == NULL || begin = end) return -1; 7 8 int mid = (begin+end)/2; 9 if(ar... 阅读全文
摘要:
1 #include 2 using namespace std; 3 4 typedef struct Node 5 { 6 int num; 7 Node* pNext; 8 }Stack,Queue; 9 10 //栈的入栈相当于 链表的头插 11 Stack* stack_push(Stack** pTop,int num) 12 { 13 ... 阅读全文