Solution: Guess the Word
C# solution for the Guess the Word problem using the Knowing What to Track pattern.
We'll cover the following...
We'll cover the following...
Statement
You are given a list of candidate words words, where each word has length secret.
You can interact with an external API master.guess(word), which takes a string word and returns an integer equal to the number of positions where word and secret have the same character. If word is not present in words, the API returns
Implement findSecretWord(words, master) to identify secret by calling master.guess at most allowedGuesses times.
Note: Each call to
master.guessmust use a word fromwords, andsecretis guaranteed to be inwords.
Constraints:
words.length...