Created
August 8, 2015 20:23
-
-
Save bragboy/a77cb6aab2523ba95665 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() | |
{ | |
trie mytrie; | |
char *s[] = {"tree","trie","algo","assoc","all","also","ass"}; | |
for(int i=0;i<sizeof(s)/sizeof(*s);i++) | |
{ | |
mytrie.insert_word(s[i]); | |
} | |
mytrie.display(); | |
if(mytrie.search_word("all") == true) cout << "all exist" << endl; | |
else cout << "all do not exist" << endl; | |
mytrie.delete_word("all"); | |
if(mytrie.search_word("all") == true) cout << "all exist" << endl; | |
else cout << "all do not exist" << endl; | |
mytrie.display(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment