摘要: View Code 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 typedef struct Lode{ 5 int elem; 6 struct Lode *pnext; 7 }LNODE, *List; 8 9 /**10 **创建一个链表11 **/12 void CreateList(List &L,int n)13 {14 L = (struct Lode*)malloc(sizeof(List));15 L->pnext = NULL;16 17 int num;18 f... 阅读全文
posted @ 2012-09-07 21:28 l851654152 阅读(185) 评论(0) 推荐(0) 编辑
摘要: View Code 1 #include <stdio.h> 2 void InsertSort(int *a,int length); 3 int main() 4 { 5 int a[8] = {5,8,7,10,25,64,3,1}; 6 InsertSort(a,8); 7 for(int i = 0;i<8;++i) 8 { 9 printf("%d ",a[i]);10 }11 printf("\n");12 return 0;13 }14 void InsertSort(int *a,int length)... 阅读全文
posted @ 2012-09-07 11:05 l851654152 阅读(166) 评论(0) 推荐(0) 编辑