摘要:
参考算法导论#include<stdio.h>#include<time.h>#include<stdlib.h>typedef int KEY;enum NodeColor{ BLACK=0, RED=1};/*定义节点*/typedef struct node{ int data; struct node* parent; struct node* left; struct node* right; enum NodeColor color;}RBTree,*PRBTree;/*标志位节点 NIL[T]*/PRBTree NIL_FLAG=NULL;/* 阅读全文