.NET Implementations of Trie Data Structures for Substring Search, Auto-completion and Intelli-sense. Includes: patricia trie, suffix trie and a trie implementation using Ukkonen's algorithm.
var trie = new SuffixTrie<int>(3);
trie.Add("hello", 1);
trie.Add("world", 2);
trie.Add("hell", 3);
var result = trie.Retrieve("ll");
The result has only 1 as an element, however, there should be 1 and 3 as results.
And if you replace trie.Add("hell", 3) with trie.Add("hell3", 3), it works as expected (1, 3 are results).
The result has only 1 as an element, however, there should be 1 and 3 as results. And if you replace
trie.Add("hell", 3)
withtrie.Add("hell3", 3)
, it works as expected (1, 3 are results).