struct node { string data; node * left, * right; node(string a) { data = a; left = NULL; right = NULL; } }; class tree { protected: node * root; public: tree() { root = NULL; } void insert(string a, node * & T) { if (T == NULL) T = new node(a); if (a < T->data) insert(a, T->left); else insert(a, T->right); } void insert(string a) { insert(a, root); } bool find(string a, node * T) { if (T == NULL) return false; if (a == T->data) return true; else if (a < T->data) return find(a, T->left); else return find(a, T->right); } bool find(string a) { return find(a, root); }