Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "RBNode.h"
- #include <iostream>
- using namespace std;
- class RedBlackTree
- {
- private:
- RBNode* root;
- RBNode* nil;
- int key;
- protected:
- void InsertFixup(RBNode* z);
- void DeleteFixup(RBNode* x);
- void LeftRotate(RBNode* x);
- void RightRotate(RBNode* x);
- RBNode* TreeSuccessor(RBNode* x);
- RBNode* TreeMinimum(RBNode* x);
- RBNode* TreeSearch(RBNode* x, int key);
- void InorderTreeWalk(RBNode* x);
- public:
- RedBlackTree();
- void Insert(RBNode* z);
- RBNode* Delete(RBNode* z);
- void Print();
- };
Advertisement
Add Comment
Please, Sign In to add comment