If you were to write an algorithm to solve hangman what would that look like

If you were to write an algorithm to solve hangman what would that look like