#ifndef __BR_TREE_H__
#define __BR_TREE_H__

#include "br_node.h"
#include "RedBlackTreeInterface.h"
#include <cstdio>
#include <iostream>
#include <vector>
#include <string>

using namespace std;

class br_tree : public RedBlackTreeInterface {
    public:
        br_tree();
        br_node* root;
        bool h;
        RedBlackNodeInterface * getRootNode();
        bool in_tree(string data);
        void add(string word);
        void addPhrase(string words);
        void remove(string word);
        void balance(br_node* cur);
        void transfer(br_node* temp1, br_node* temp2);
        void bal_del(br_node* x);
        br_node* del_leaf(br_node* root, string data);
        void right_rot(br_node* x);
        void left_rot(br_node* x);
        void printer(br_node* node, int a);
        br_node* del(br_node* succ, br_node* n);
        br_node* min(br_node* temp);
        string printTree();
};
#endif
