data structure for strings
From: Marc Tardif <intmktg_at_Gloria.CAM.ORG>
Date: 2000/07/23
Message-ID: <Pine.LNX.4.10.10007232050070.5828-100000_at_Gloria.CAM.ORG>#1/1
Date: 2000/07/23
Message-ID: <Pine.LNX.4.10.10007232050070.5828-100000_at_Gloria.CAM.ORG>#1/1
If I have 130 words of up to 6 characters, in what kind of data structure
can I store these words for quick string comparison? In other words, if I
have an unknown word, I need to determine if it is like any of the 130
words. This data structure does not need to be expandable, the list will
always be the same 130 words.
I thought of using the Aho-Corasick algorithm for multiple-pattern
matching, but considering each trie entry takes about 20bytes (tree ptr,
next, fail, label) and each tree node another 16bytes (trie ptr, left
node, right node, balance), that ends-up taking far too much memory. Any
other ideas would be much appreciated.