
17 Sep
2005
17 Sep
'05
12:05 a.m.
Elisha Berns wrote:
1) What type of algorithm/container should be used here?
You need some kind of a Trie - http://en.wikipedia.org/wiki/Trie
2) Would its performance be much better than a general purpose associative container?
Performance-wise, it should be about the same as a hash_map. Memory-wise, a trie should be much better. AFAIK there is nothing resembling a trie in Boost, but there are other free implementations available.