What is an appropriate data structure?
I am working on a program that accepts a string of 7 letters and then tries to find every word in a dictionary that contains those 7 letters.
Basically it is an anagram program that finds valid scrabble words with given letters.
Anyway, my dictionary file is a word list of over 200,000 words stored in a text file. My queston is, should i find all possible letter combinations of my 7 letters then compare each combination against each word in the list then return all matches?
I'm not to concerned with the algorithm at present as it will evolve as i go, but i am trying to figure out the best way to store the word list.
Should i just keep them in a file or should i try load them into an array or some other kind of structure? I did try loading them all into a sql database but people have told me that sql is quite inefficient for what i am trying to do.
Any advice would be great.