Find names of more than 5 characters may take several days to complete, so I guess it's not useful
The problem here is actually a very common one - finding all permutations (orderings) of a given collection.
There are a number of implementations in C# - I've modified one I found to make it a little simpler for you to understand, see below:
void Main()
{
var numberOfLetterPermutations = 4;
var providedLetters = new [] { 'y', 'j', 'k', 'a' };
var enumerable = GetCombinations(providedLetters, 4);
var allPossiblePermutations = enumerable.ToList();
}
public IEnumerable<IEnumerable<char>> GetCombinations(IEnumerable<char> list, int length)
{
if (length == 1)
{
return list.Select(a => new char[] { a });
}
return GetCombinations(list, length - 1)
.SelectMany(t => list, (firstChar, secondChar) => firstChar.Concat(new char[] { secondChar }));
}
As you can see from the usage it'll generate all of the possible permutations based on a given set of letters.
You should now be able to iterate over the returned collection to then make your web requests to neopets and determine whether the pet name is available:
var allPossiblePermutations = enumerable.ToList();
foreach(var permutation in allPossiblePermutations)
{
var isAvailable = DetermineAvailability(permutation);
// if it's available, add to a list of available options
// etc etc
}
public bool DetermineAvailability(string permutation)
{
// make request to neopets & parse response
return true;
}