Skip to main content
1 of 9
Catija Staff
  • 301
  • 1
  • 8
  • 21

Clutch Wordle Solver with known inputs

Sometimes when you're playing Wordle, you get to your fifth guess and you can't figure out the word any more, so you start mentally running through the list of remaining iterations, both sensical and nonsensical trying to figure out what those last few letters are.

The task here is to create all permutations of a final Wordle guess to save me from having to do it in my head, with the following rules:

General rule - since Wordle only uses valid English words, only letters that appear on a standard English keyboard (a-z) need to be tested.

Input:

  1. Green Guesses: Must accept a list of known letters and their position/s.
  2. Yellow Guesses: Must accept a list of known letters with positions they can not be (green guess positions can be excluded).
  3. Unguessed Letters: Must accept a list of remaining unguessed letters.
  4. (Optional) a way to indicate if a letter is known to appear only n times, excluding it from further consideration.

Note, green and yellow may still appear in more than the known positions.

Output:

  1. All possible outcomes must be presented (no need to import a dictionary).
  2. Solution set should be sorted alphabetically, A-Z.

What's the shortest way to solve this problem?

Catija Staff
  • 301
  • 1
  • 8
  • 21