🪢

Hangman Solver

Week 47

It's the holidays and you often find yourself playing Hangman and other similar games with your family - since there are often prizes like snacks for winning, you want to use your programming skills to gain an advantage compared to the rest of the players

For those unaware, Hangman is a game where someone chooses a word which they keep private, then 1 or more other players continually guess letters - if the letter exists in the mystery word, that letter's position in the word is revealed - for example, suppose our mystery word contains 5 letters "_____" - if the player guesses "a" and it exists in the word, that "a" is revealed "a____", if they guess "i", that doesn't exist, so they lose a life, if they guess "e" we get "a___e", if they guess "p", it becomes "app_e" and finally they win with a guess of "l" to make "apple" - the actual knowledge of the game's rules aren't required for this challenge

If you would like to familiarise yourself with the game more, you can find online versions like this

The goal of the challenge is to use this word list to output all possible valid words based on a current guess status

For example, suppose we wanted to get all matching words for the array of 3 inputs ["_a__t_", "b__", "____z"], we would then get the following output:

You should run your program on the following array of 10 inputs, generating output in the same format as the example above

Paste your answer below - note the order of your words/lines doesn't matter:

Hints

Hints will be released at the start of each of the following days - e.g. the start of day 3 is 48 hours after the challenge starts

Release Day Hint
2
47 2026