I've ran across several questions and articles saying that dictionary implementation in java is done best using tries. But most of them didn't address important issues, as far as I saw it. So, next is a real world task:
Let's assume that I need to implement a dictionary (let's say something like Lingvo, but simpler) using java. For my particular task it is needed to store word definitions and to perform fast dictionary lookup.
Please, address next questions:
- What data structure should I use then (Trie or HashTable)?
- How should it(search, datastruct) be organised if I need the dictionary to be case insensitive?
- What if I want it(search, dictionary) to be case sensitive?
P.S.: Code examples are highly appreciated. :)
Thanks for answers in advance.
UPDATE:If we're talking about standard DS implementations in java, is it true that HashTable will be the best one for this particular task? Why not HashMap, TreeMap or LinkedHashMap?