![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
文章平均质量分 75
青春兵荒马乱-
这个作者很懒,什么都没留下…
展开
-
平衡二叉树排序树
平衡二叉树排序树 #include #include #define ENDKEY 0 typedef int KeyType; typedef struct node { KeyType key ; /*关键字的值*/ int bf; //平衡因子 struct node *lchild,*rchild;/*左右指针*/ }AVLTNode, *AVLTree;转载 2013-11-20 12:30:30 · 722 阅读 · 0 评论 -
单链表的逆置
单链表的逆置 #include #include typedef struct node { char data; struct node *next; }node, *list; list TailCreat(); //尾插法创建链表 void Reverse(head); //逆置 void print(he原创 2013-11-07 16:14:20 · 514 阅读 · 0 评论 -
单链表的创建插入与删除
单链表的创建插入与删除 /*注意因为建表时用了字符型数据所以输入数字时只能输0~9*/ #include #include typedef struct node //结点的结构体 { int data; //数据域 struct node *next;原创 2013-11-07 09:18:56 · 890 阅读 · 0 评论 -
双向链表的建立插入与删除
双向链表的建立插入与删除 #include #include typedef struct node { char data; struct node *pre; struct node *next; }node, *list; list TailCreat(); //尾插法创建链表 void Insert(list head,原创 2013-11-07 14:18:11 · 417 阅读 · 0 评论 -
栈的创建入栈出栈
栈的创建入栈出栈 #include #include typedef struct node //结点结构 { int data; struct node *next; }Node, *Pnode; typedef struct stack //栈结构 { Pnode top; Pnode bottom; }Stack,原创 2013-11-09 14:53:53 · 632 阅读 · 0 评论 -
二叉树的创建与递归遍历
二叉树的创建于递归遍历 #include #include typedef struct Node { char data; struct Node *lch; struct Node *rch; }BiNode, *BiTree; void Creat1(BiTree *T); //二叉树的创建,第一种方法 BiTree Creat2()原创 2013-11-11 16:31:27 · 502 阅读 · 0 评论 -
二叉排序树的创建查找与删除
二叉排序树的创建查找与删除 #include #include typedef struct Node { int data; struct Node *lch; struct Node *rch; }BiNode, *BiTree; void Creat(BiTree *T); //创建一个二叉排序树 void Insert(BiTree *T, in原创 2013-11-14 17:12:11 · 384 阅读 · 0 评论 -
已知中序后序创建二叉树
#include #include #include #include template class BinaryTree { public: struct TreeNode { Type data; TreeNode *leftchild, *rightchild; }; BinaryTree() {} ~BinaryTree(){} private: TreeNode *原创 2014-03-19 20:20:48 · 774 阅读 · 0 评论