摘要: 2014学习计划 阅读全文
posted @ 2014-03-11 23:06 ↙公子ゞ小白 阅读(97) 评论(0) 推荐(0)
摘要: 冒泡排序:void bublle_sort(int s[], int n){ int i, j, temp; for (i = 0; i = 0 && s[j] > temp; j--) { s[j+1] = s[j]; } s[j+1] = temp; }}选择排序:void select_sort(int s[], int n){ int i,j,min,temp; for (i = 0; i i && s[j] >= temp) j--; s[i] = s[... 阅读全文
posted @ 2014-03-20 10:31 ↙公子ゞ小白 阅读(105) 评论(0) 推荐(0)
摘要: 二分查找的代码int bfind(int* a,int len, int val){ int le = 0,re = len - 1,m; while (leval) re = m - 1; else le = m + 1; } return -1; //}写出在母串中查找子串出现次数int count1(char* str,char* s){ char* s1; char* s2; int count = 0; while(*str!='\0') { s1 =... 阅读全文
posted @ 2014-03-18 13:47 ↙公子ゞ小白 阅读(459) 评论(0) 推荐(1)