上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
摘要: 1 #include 2 using namespace std; 3 void shellsort(int v[],int n) 4 { 5 int gap,i,j,temp; 6 for (gap = n/2 ; gap >0 ; gap /= 2) 7 { 8 for (i = gap; i =0 && v[j] > v[j+gap] ; j -= gap)11 {12 temp = v[j];13 v[j] = v[j + gap];14 ... 阅读全文
posted @ 2013-09-16 14:43 Big.Eagle 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 1. 一个单向链表倒置,最简单高效的方法(算法)2. LoadLibrary 与 LoadLibraryEx 的区别(WINDOWS)3. 进程与线程的区别(理论)4.如果碰到一个非必现的崩溃,你该怎么办?(解决问题的方法)我们这客户端面试的原题. 阅读全文
posted @ 2013-09-10 16:15 Big.Eagle 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 3 4 void ReverseArray(int A[],int n); 5 void PrintArray(int A[],int n); 6 7 #define NUM 10 8 9 void main()10 {11 int a[NUM];12 13 for (int i=0;i<NUM;i++)14 {15 a[i]=i+1;16 }17 18 ReverseArray(a,NUM);19 PrintArray(a,NUM);20 21 getchar();22 }... 阅读全文
posted @ 2013-09-10 11:44 Big.Eagle 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 //#include 3 4 bool BubbleSort(int A[],int n) 5 { 6 // assert(A != NULL); 7 // assert(n != 0 ); 8 if (A==NULL || nA[j+1])18 {19 int temp = A[j];20 A[j] = A[j+1];21 A[j+1] = temp;22 }23 }24 }2... 阅读全文
posted @ 2013-09-10 10:23 Big.Eagle 阅读(187) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;struct student{ long num; float score; struct student *next;};int n;//初始化一个链表void create(struct student **head){ struct student *p1,*p2; n = 0; p1 = p2 = new struct student; cin>>p1->num; cin>>p1->score; while (p1->num != 0 ) { n = n+1... 阅读全文
posted @ 2013-09-05 15:24 Big.Eagle 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 1 #include "iostream" 2 using namespace std; 3 4 #define MAXLENGTH 20 5 typedef struct Queue 6 { 7 int array[MAXLENGTH]; 8 //first指向将要被删除的元素的下标,tail指向可以被插入元素的位置 9 int first,tail; 10 }Queue; 11 12 void initial(Queue *queue) 13 { 14 queue->first = 0; 15 queue->tail = 0;... 阅读全文
posted @ 2013-09-04 17:06 Big.Eagle 阅读(218) 评论(0) 推荐(0) 编辑
摘要: ------- 阅读全文
posted @ 2013-09-04 15:22 Big.Eagle 阅读(131) 评论(0) 推荐(0) 编辑
摘要: ------- 阅读全文
posted @ 2013-09-04 15:21 Big.Eagle 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 #define STACKLENGTH 20 4 typedef struct Stack 5 { 6 int s[STACKLENGTH]; 7 int t; 8 }Stack; 9 10 void initial(Stack *stack) 11 { 12 //第一个元素舍去不用 13 stack->s[0] = 0; 14 stack->t = 0; 15 } 16 //入栈 17 bool push(Stack *stack,int elem) 18 {... 阅读全文
posted @ 2013-09-04 15:17 Big.Eagle 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 #define MAXLENGTH 20 4 5 typedef struct LineList 6 { 7 int Array[MAXLENGTH]; 8 int curLength; 9 }LineList; 10 11 bool initial(LineList* elem) 12 { 13 elem->Array[0] = 0; 14 elem->curLength = 0; 15 return true; 16 } 17 18 //-------... 阅读全文
posted @ 2013-09-04 14:18 Big.Eagle 阅读(225) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页