
数据结构
文章平均质量分 74
Helloguoke
这个作者很懒,什么都没留下…
展开
-
二叉排序树的详细实现(转)
//原址:http://blog.youkuaiyun.com/touch_2011/article/details/6831924 1、序 详细实现了二叉查找树的各种操作:插入结点、构造二叉树、删除结点、查找、 查找最大值、查找最小值、查找指定结点的前驱和后继 2、二叉查找树简介 它或者是一棵空树;或者是具有下列性质的二叉树: (1)若左子树不空,则左子树上所有结点的值均小于它原创 2013-11-22 11:03:02 · 646 阅读 · 0 评论 -
C语言创建单链表
#include #include #include struct Node{ int value; struct Node *link; }; void CreatLink(struct Node **pr) { //pr=NULL; //pr->value=-1; } int NodeInsert(struct Node **pr,int v) { struct Node *current;原创 2013-11-22 11:00:49 · 915 阅读 · 0 评论 -
二叉树的递归实现及递归遍历
#include #include //定义节点 typedef struct BiNode{ char data; struct BiNode *lch; struct BiNode *rch; }BiNode,*BiTree; //先序拓展序列建立二叉树 void Create(BiTree &T) { T =(BiNod原创 2013-11-22 11:02:28 · 705 阅读 · 0 评论 -
二叉排序树的创建与遍历
题目:http://ac.jobdu.com/problem.php?pid=1201 #include using namespace std; typedef struct BTNode{ int v; struct BTNode *lchild; struct BTNode *rchild; struct BTNode *parent; }BNode,*BTree; //节点插入 void原创 2013-11-22 11:03:00 · 767 阅读 · 0 评论