public bool startsWith(string prefix) { Trie node = searchPrefix(prefix); return(node != null); }
public bool search(string word) { Trie node = searchPrefix(word); return(node != null && node.isEnd); }