General information
Category:
Coding, syntax and commands
>>>I'm trying to write code that will generate valid English words from an array of seven letters.
>>>string[] letters = new string[] { "g", "a", "u", "n", "t", "l", "e", "t' };
>>>
>>>I found a dictionary that gives valid results when testing to see if a word is valid.
>>>(See checkit, below)
>>
>>Each letter can only be used once?
>>
>You can use a letter more than once.
>
Hmmm,
intent still not clear, as example already includes "t" twice. You can speed up performance of the permutation generation by pruning the source letter array to have only discrete entries - unless you do, "ttttttt" will be in result list several times, as well as more than 1 entry for every result including at least 1 "t".
"dean" will get you all the *discrete* results "deadended" could evoke in less time if the repeating permutation is your goal ;-)
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only