redblack tree 红黑树代码

时间:2015-01-08 03:24:32
【文件属性】:

文件名称:redblack tree 红黑树代码

文件大小:7KB

文件格式:C

更新时间:2015-01-08 03:24:32

红黑树,red black tree

红黑树C语言代码: #include "redblack.h" #include #include "fatal.h" 头文件: #include #include "fatal.h" typedef int ElementType; #define NegInfinity (-10000) #ifndef _RedBlack_H #define _RedBlack_H struct RedBlackNode; typedef struct RedBlackNode *Position; typedef struct RedBlackNode *RedBlackTree; RedBlackTree MakeEmpty( RedBlackTree T ); Position Find( ElementType X, RedBlackTree T ); Position FindMin( RedBlackTree T ); Position FindMax( RedBlackTree T ); RedBlackTree Initialize( void ); RedBlackTree Insert( ElementType X, RedBlackTree T ); RedBlackTree Remove( ElementType X, RedBlackTree T ); ElementType Retrieve( Position P ); void PrintTree( RedBlackTree T ); #endif /* _RedBlack_H */ /* END */


网友评论