adding cs235

This commit is contained in:
dm
2016-04-06 20:46:10 -07:00
parent 8e52ce1982
commit cf99ec6565
178 changed files with 13079 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
#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