Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- #include <fstream>
- #include <cstring>
- using namespace std;
- typedef string TreeType;
- struct Node
- {
- Node * left;
- TreeType word;
- int count;
- Node * right;
- };
- class BST
- {
- public:
- BST();
- ~BST();
- bool Empty();
- bool Insert(TreeType);
- void Delete(TreeType);
- void write();
- void InOrder(Node*);
- void PostOrderDelete(Node*, Node*, TreeType);
- ofstream OutputFile;
- int findMax();
- int total(Node*);
- int NodeTotal();
- /*void PostOrder(Node*, string);
- void PreOrder(Node*, string);*/
- private:
- int NodeTotalRecursive(Node*);
- int height(Node*);
- int max(int, int);
- void DeleteAll(Node*);
- void Process(Node*);
- Node* Root;
- };
Advertisement
Add Comment
Please, Sign In to add comment