数据结构
LeeBooL
这个作者很懒,什么都没留下…
展开
-
AVL-TREE
#include <iostream>#include <stdio.h>using namespace std;typedef int keyType;struct BinaryTreeNode { keyType key; int height; //记录以该节点为root的树高度 BinaryTreeNode* left; // left child B原创 2016-01-23 18:37:33 · 373 阅读 · 0 评论 -
红黑树代码实现
#include <stdio.h>#include <stdlib.h>#include <string.h>typedef int Elemtype;#define RED 0#define BLACK 1struct RB_Tree{ Elemtype val; int color; struct RB_Tree *lchild, *rchild; str原创 2016-01-28 17:07:21 · 375 阅读 · 0 评论