Hi, I am creating a "Letter Peak" or "Wordscapes" type game where the user is given SIX letters, and they have to make words that will be checked with an array of English dictionary.
Well, that part is done. Works great.
However, when the random letters are assigned, I want an Array to store all possible valid words that can be made from these letters. This is where I'm getting stuck. I tried a method with double-for-loop that iterates each permutation of these random 6 letter words with each word of english dictionary, it does work but it gets stuck for 10 seconds to do so. That's because my Dictionary array is 14k words, and combined permutations of the 6 letters are also 1000+. So, some millions of iterations.
I want to reduce these iterations to extract and store all valid English words from the combinations of randomly given 6 letters.
Any help will be appreciated!