0001 #include "BST/BST.h" //基于BST实现RedBlack 0002 template <typename T> class RedBlack : public BST<T> { //RedBlack树模板类 0003 protected: 0004 void solveDoubleRed( BinNodePosi<T> x ); //双红修正 0005 void solveDoubleBlack( BinNodePosi<T> x ); //双黑修正 0006 public: 0007 BinNodePosi<T> insert( const T& e ); //插入(重写) 0008 bool remove( const T& e ); //删除(重写) 0009 // BST::search()等其余接口可直接沿用 0010 };