Hello Harry,

   If you are talking about the typical dictionary (which means the
words are roughly uniformly spread out across each starting character
node a,b,c,d...), then I would say Splay trees  would be a good
choice. They are easier to implement and they are considerably faster
or at least as better as other height balancing trees.

Also,you might want to consider a yet simpler structure - Binary
Search Trees as it would be optimally fitting your requirements.
[Splay trees are faster than BSTs but you have to do a lot of
balancing of the tree height work]


Trees should be of choice because -the most important feature of a
dictionary is that you should be able to search a word in the shortest
possible time, and then we need to worry about efficient
storage.HashMap will store each word as a separate entry - which
means  'dance' and 'dancer' are 2 separate entries, where all you
needed was an extra character. ArrayList is out of question, since you
will spend considerable time searching within the internal array(s).

Hope this helps!


On Mar 3, 6:04 pm, Harry68 <[email protected]> wrote:
> Hello Everyone,
>
> I want to write an dictionary application for Android.
> I want it offline with at least 5000words.
> my questions are:
>
> what should I use to store my words, I mean is it a good idea to
> create an ArrayList, hashmap etc?
> if not then why and what do you propose?
>
> the more important thing for me this this how to create a database to
> store the words which will be at least 5000
> I want the apps to work fast and work offline no need of network.
>
> thanks in advance

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to