摘要:
#include #include #include //链栈 typedef struct node { char item[30]; struct node* next; }Node; typedef struct stack { Node *top; }Stack; //队列 typedef struct queueNode { char item[30]... 阅读全文
摘要:
#include #include typedef struct node * polynomial; struct node { int coef; //系数 int index; //指数 polynomial next; }; //读取函数 polynomial ReadPolynomial() { polynomial ... 阅读全文
摘要:
#include #include typedef struct node* DNode; struct node { int data; DNode prior; //前面数据地址 DNode next; //后面数据地址 }; //创建双向链表 void CreatNode(DNode *head) { DNode s; //新节点指针 char... 阅读全文
摘要:
#include #include typedef char ElementType; typedef struct node* LinkStack; struct node { ElementType data; LinkStack next; }; //初始化 void InitLinkStack(LinkStack *L) { (*L) = NULL; } //入栈... 阅读全文
摘要:
#include #include #define MaxSize 10 typedef struct node* SeqStack; typedef char ElementType; struct node { ElementType data[MaxSize]; int top; //标记栈顶数据 }; //初始化 void InitNode(SeqStack *L)... 阅读全文
摘要:
#include #include typedef int ElemType; typedef struct Queue *QPtrl; typedef QPtrl List; struct Queue { ElemType data; QPtrl next; List Front, Rear; //分别是出队和入队的指针 }; //初始化 QPtrl InitQue... 阅读全文
摘要:
#include #include #define MaxSize 5 typedef struct node* SeQuence; struct node { char data[MaxSize]; int Front, Rear; //Front队头,出队用,Rear队尾,入队用 }; //初始化 void InitQuence(SeQuence *L) { (*L)... 阅读全文
摘要:
#include #include #define MaxSize 10 typedef int ElementType; struct SqList { ElementType elem[MaxSize]; int Length; }; typedef struct SqList *PtrNode; typedef PtrNode List; List InitList() ... 阅读全文
摘要:
#include #include typedef struct Node *List; struct Node { char data; List next; }; //头插法的建立 /*void CreatList(List *L) { List s; char e; (*L) =(List)malloc(sizeof(struct Node));... 阅读全文