11 2011 档案
摘要:#include<stdio.h>#include<stdlib.h> #define MAXLen 100 //最大节点数typedef char DATA;//元素类型typedef struct CBT{ DATA data; struct CBT *left;//左子树节点指针 struct CBT *right;//右子树节点指针}CBTType; CBTType *InitTree...
阅读全文
摘要:#include<stdio.h>#include<stdlib.h>#include<string.h> #define QUEUELEN 15 typedef struct{ char name[10]; int age;}DATA; typedef struct{ DATA data[QUEUELEN]; int head; int tail;}SQType; SQType *SQTyp...
阅读全文
摘要:#include <stdlib.h>#include <stdio.h> #define MAXLEN 50 typedef struct{ char name[10]; int age;}DATA; typedef struct stack{ DATA data[MAXLEN+1]; int top;}StackType; StackType *STInit(){ StackType *p...
阅读全文
摘要:#include <stdio.h>#include <string.h>#include <stdlib.h> typedef struct{ char key[10]; char name[20]; int age;}Data; typedef struct Node //定义链表结构{ Data nodeData; struct Node *nextNode;}CLType; CLTyp...
阅读全文
摘要:本系列日志为操作练习代码,参考书《C/C++常用算法手册 》。 //顺序表 Sequential List#include<stdio.h>#include<string.h>#define MAXLEN 100 //定义顺序表的最大长度 typedef struct //定义节点类型{ char key[10]; //节点的关键字 char name[20]; int age;}DATA; ...
阅读全文