예제 #1
0
        public bool startsWith(string prefix)
        {
            Trie node = searchPrefix(prefix);

            return(node != null);
        }
예제 #2
0
        public bool search(string word)
        {
            Trie node = searchPrefix(word);

            return(node != null && node.isEnd);
        }