上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 28 下一页

2012年8月3日

链式队列M

摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #define ok 1 4 #define error 0 5 #define overflow -1 6 #define TRUE 1 7 #define FALSE 0 8 #define status int 9 typedef struct QNode 10 { int data; 11 struct QNode *next; 12 }QNode,*QueuePtr; 13 typedef struct 14 { QueuePtr front; 15 QueueP... 阅读全文

posted @ 2012-08-03 08:14 mycapple 阅读(172) 评论(0) 推荐(0) 编辑

循环队列M

摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #define TRUE 1 4 #define FALSE 0 5 #define ERROR 0 6 #define OK 1 7 #define OVERFLOW -2 8 #define MAXQSIZE 100 9 #define LEN sizeof(QElemType)10 typedef int Status;11 typedef int QElemType;12 typedef struct13 {14 QElemType *base;15 int front;16 阅读全文

posted @ 2012-08-03 08:14 mycapple 阅读(265) 评论(0) 推荐(0) 编辑

中缀表达式-后缀表达式M

摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #define Stack_Size 100 4 #define StackIncrement 10 5 #define Ok 1 6 #define Error 0 7 #define True 1 8 #define False 0 9 #define Overflow -2 10 typedef int status; 11 //字符栈的操作 12 typedef struct 13 { 14 char *base; 15 char *top; 16 int stacks... 阅读全文

posted @ 2012-08-03 08:13 mycapple 阅读(406) 评论(0) 推荐(0) 编辑

括号匹配M

摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 #define Stack_Size 100 5 #define Stackincrement 10 6 #define ok 1 7 #define error 0 8 #define overflow 2 9 #define true 1 10 #define false 0 11 typedef int status; 12 typedef struct 13 { 14 char *base; 15 char *top; 16 阅读全文

posted @ 2012-08-03 08:12 mycapple 阅读(236) 评论(0) 推荐(0) 编辑

进制数转换M

摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #define Stack_Size 100 4 #define Stackincrement 10 5 #define ok 0 6 #define error -1 7 #define overflow 2 8 #define TRUE 1 9 #define FALSE 0 10 typedef int status; 11 typedef struct 12 { 13 int *base; 14 int *top; 15 int stacksize; 16 }SqSta... 阅读全文

posted @ 2012-08-03 08:10 mycapple 阅读(307) 评论(0) 推荐(0) 编辑

后缀表达式求解MH

摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #define Stack_Size 100 4 #define StackIncrement 10 5 #define Ok 1 6 #define Error 0 7 #define Overflow -2 8 #define True 1 9 #define False -1 10 typedef int status; 11 //数字栈的操作 12 typedef struct 13 { 14 float *base; 15 float *top; 16 int sta... 阅读全文

posted @ 2012-08-03 08:09 mycapple 阅读(290) 评论(0) 推荐(0) 编辑

表达式求值M

摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #define Stack_Size 100 4 #define StackIncrement 10 5 #define Ok 1 6 #define Error 0 7 #define Overflow -2 8 #define True 1 9 #define False 0 10 typedef int status; 11 char s[100]; 12 //字符栈的操作 13 typedef struct 14 { 15 char *base; 16 char *top... 阅读全文

posted @ 2012-08-03 08:08 mycapple 阅读(207) 评论(0) 推荐(0) 编辑

链表的插入与删除M

摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #define OK 1 4 #define error -1 5 typedef struct LNode 6 { 7 int data; 8 struct LNode *next; 9 }LNode,*LinkList;10 LinkList CreateList(int n)11 {12 LinkList L,p,s;13 int i; 14 L=(LinkList)malloc(sizeof(LNode));15 L->next=NULL;L... 阅读全文

posted @ 2012-08-03 08:07 mycapple 阅读(371) 评论(0) 推荐(0) 编辑

顺序表的插入与删除M

摘要: 1 #define LIST_SIZE 80 2 #define LISTINCREMENT 10 3 #define ok 1 4 #define overflow -1 5 #define error -2 6 #include<stdio.h> 7 #include<stdlib.h> 8 typedef struct 9 {10 int *elem;11 int length;12 int listsize;13 }sqlist;14 int initlist(sqlist &L)15 {16 L.elem=(int *)malloc(LIST_SIZE 阅读全文

posted @ 2012-08-03 08:05 mycapple 阅读(605) 评论(0) 推荐(0) 编辑

顺序表的就地逆置M

摘要: 1 #define LIST_SIZE 80 2 #define LISTINCREMENT 10 3 #define ok 1 4 #define overflow -1 5 #define error -2 6 #include<stdio.h> 7 #include<stdlib.h> 8 typedef struct 9 {10 int *elem;11 int length;12 int listsize;13 }sqlist;14 int initlist(sqlist &L)15 {16 L.elem=(int *)malloc(LIST_SIZE 阅读全文

posted @ 2012-08-03 08:05 mycapple 阅读(1534) 评论(0) 推荐(0) 编辑

上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 28 下一页

导航