数据结构
黑眼妹妹
这个作者很懒,什么都没留下…
展开
-
数据结构之链栈
#include"stdio.h" #include"malloc.h" #include"stdlib.h" #define OK 1 #define ERROR 0 typedef int ElemType; typedef struct node { ElemType data; struct node *next; }LinkStack; /*链栈的初始化操作*/ LinkStack *InitStack() { LinkStack *s; s=(LinkStack *)mallo原创 2021-06-07 18:49:00 · 218 阅读 · 0 评论 -
数据结构之线索二叉树
#include<stdio.h> #include<stdlib.h> #include<malloc.h> #define M 20 typedef char ElemType; typedef struct node { ElemType data; struct node *left,*right; }BiTree; typedef struct { BiTree *ptr; char tag; }seqstack; BiTree *CreateBiTre原创 2021-06-07 18:41:50 · 119 阅读 · 0 评论 -
数据结构之链队列
#include"stdio.h" #include"stdlib.h" #include"malloc.h" #define ERROR 0 #define OK 1 typedef int ElemType; typedef struct node { ElemType data; struct node *next; }QueueNode; typedef struct { QueueNode *front; QueueNode *rear; }LinkQueue; /*链队列的初始化操作*/原创 2021-06-07 18:43:30 · 193 阅读 · 0 评论 -
数据结构之二叉树的遍历
#include<stdio.h> #include<stdlib.h> #include<malloc.h> #define M 20 typedef char ElemType; typedef struct node { ElemType data; struct node *left,*right; }BiTree; typedef struct { BiTree *ptr; char tag; }seqstack; BiTree *CreateBiTre原创 2021-06-07 18:40:44 · 101 阅读 · 0 评论