Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Head breaker
Message
De
03/07/2019 05:10:15
 
 
À
03/07/2019 03:17:03
Information générale
Forum:
C#
Catégorie:
Code, syntaxe and commandes
Titre:
Divers
Thread ID:
01669346
Message ID:
01669356
Vues:
49
>>//upd:
>>if this an attempt to recreate Als letter shuffling from chatter, you are probay correct to go for recursive and have a strikeout list as parameter to signify already used letters. But this will only get you 7!+6!+5! words, so slightly less than 6000.
>
>I think it is
>
>(7 * 6 * 5 * 4 * 3 * 2 * 1) + (7 * 6 * 5 * 4 * 3 * 2) + (7 * 6 * 5 * 4 * 3)
>or 
> 7! + 7! / 1! + 7! / 2!
>
Thx for spotting: of course the pool of letters to draw from does not shrink if result is shortened - I should not type soon after waking from hayfever sneeze ;-)

>
>
>>
>>>>>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 don't want words with fewer than 5 characters.
>>>>>The word must contain (anywhere) the first letter in the array
>>>>>I want to write the valid words to a text file.
>>>>>
>>>>>I think that the word generation can be done recursively but I've been getting nowhere.
>>>>>
>>>>>Any ideas?
>>
>>>>http://csharphelper.com/blog/2014/09/generate-random-strings-in-c/
>>>Thank you, Borislav but I don't think that will do it.
>>>I want to generate the 800K+ possible words (7^7) and test them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform