bstree.h

来自「程序包括了平衡二叉树的查找,插入,删除,合并等操作」· C头文件 代码 · 共 25 行

H
25
字号
typedef char ElemType;

typedef struct BSTNode {
	ElemType data;
	int bf;
	struct BSTNode *lchild,* rchild;
}BSTNode,*BSTree;

#define EQ(a,b) ((a) == (b))
#define LT(a,b) ((a) < (b))
#define LQ(a,b) ((a) <= (b))

void R_Rotate( BSTree &p);
void L_Rotate(BSTree &p);
int InsertAVL(BSTree &T,ElemType e,bool &taller,int &insert);
void LeftBalance(BSTree &T);
void RightBalance(BSTree &T);
int CreatAVL(BSTree &T,bool &taller);
void PrintAVL(BSTree &T,int n);
int DestroyAVL(BSTree &T);
int SearchAVL(BSTree &T,ElemType e,int &find);
int DeleteAVL(BSTree &T,ElemType e,bool &taller,int &del);
void RightBalance2(BSTree &T,bool &taller);
void LeftBalance2(BSTree &T,bool &taller);
int MergeAVL(BSTree &T1,BSTree &T2,bool &taller,int &insert);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?