09 2015 档案

八大排序算法总结
摘要:1.关键代码段选择排序 1 void Selectsort(int a[], int n) 2 { 3 int i, j, nMinIndex; 4 for (i = 0; i = temp)12 break;13 a[i] = a[j]; ... 阅读全文

posted @ 2015-09-30 10:53 306573704 阅读(481) 评论(0) 推荐(0)

Unicode-字符编码的历史由来(转)
摘要:http://www.nowamagic.net/internet/internet_CharsetHistory.php 很久很久以前,有一群人,他们决定用8个可以开合的晶体管来组合成不同的状态,以表示世界上的万物。他们看到8个开关状态是好的,于是他们把这称为"字节"。 再后来,他们又做了一些... 阅读全文

posted @ 2015-09-28 15:29 306573704 阅读(456) 评论(0) 推荐(0)

树、图、栈、队列
摘要:http://blog.sina.com.cn/s/blog_6997f0150100y55v.html 图1上图描述的数据结构就是“树”,其中最上面那个圈圈A称之为根节点(root),其它圈圈称为节点(node),当然root可以认为是node的特例。树跟之前学习过的... 阅读全文

posted @ 2015-09-28 11:08 306573704 阅读(504) 评论(0) 推荐(0)

排序
摘要:待 阅读全文

posted @ 2015-09-28 11:08 306573704 阅读(108) 评论(0) 推荐(0)

特殊数
摘要:一、约瑟夫环1.数组解法int _tmain(int argc, _TCHAR* argv[]){ int i, j; int a[N] = {0}; //表示N号人还在圈中 int ptr = 0; //标记当前数到位置的指针 for (i = 0; i = 3) ... 阅读全文

posted @ 2015-09-27 22:05 306573704 阅读(240) 评论(0) 推荐(0)

字符串
摘要:1.字符串逆置(字符串回文-字符串逆置后与原字符串比较)用指针实现:int main(int argc, char* argv[]){ char *str = "hello world"; int len = strlen(str); //分配内存 //将src拷贝到新分配的内存中 ... 阅读全文

posted @ 2015-09-24 16:31 306573704 阅读(320) 评论(0) 推荐(0)

改错+GetMemory问题
摘要:试题1:1 void test1()2 {3 char string[10];4 char* str1 ="0123456789";5 strcpy( string, str1 );6 }试题2: 1 void test2() 2 { 3 charstring[10],str1[10]; 4... 阅读全文

posted @ 2015-09-23 16:59 306573704 阅读(249) 评论(0) 推荐(1)

单链表
摘要:1 #include 2 using namespace std; 3 4 //单链表结构体 5 typedef struct student 6 { 7 int data; 8 struct student *next; 9 }node;10 11 //建立单链表12 no... 阅读全文

posted @ 2015-09-22 16:55 306573704 阅读(176) 评论(0) 推荐(0)

导航