N
N
nadom2015-03-14 12:48:15
Programming
nadom, 2015-03-14 12:48:15

How to organize a dictionary for quick work with it?

Good afternoon.
I'm making a small game, something like "erudite" and now I have a question.
To implement the computer logic, it is necessary to have and store in memory a base and possible words for moves (kuuuuch nouns), it is also needed to check the correctness of the player's move.
What is the best way to store this dictionary in memory or can it even read from a file every time so as not to load RAM (there are quite a few words).
If we were talking about numbers, then the choice is clear - a tree or a sorted array / list / etc.
But what to think of for a quick search for strings?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
asd111, 2015-03-14
@nadom

A bit of theory

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question