Beispiel #1
0
        public long[] Solve(string text, long n, string[] patterns)
        {
            Trie root = Trie.ConstructTrie(n, patterns);

            return(Trie.Search(root, text, patterns));
        }
Beispiel #2
0
        public string[] Solve(long n, string[] patterns)
        {
            var trie = Trie.ConstructTrie(n, patterns);

            return(Trie.Print(trie));
        }