Tries

some pseudo code:

# define SIZE 26
class node{
bool is_end_of_word=false;
node *children[SIZE]={0};
}
bool search(string s, node *root, int i=0){
if(i==s.length() && is_end_of_word)
return true;
if(i==s.length())
return false;
char c = s[i];
if(root->children[i])
return search(s, root->children[i], i+1)
else
return false;