Algorithm · Moveworks · Hard
You have a list wordlist of candidate words with no repeats. Every word in it has the same length L and is made only of lowercase letters. Exactly one of these words is a hidden secret, and it is guaranteed to appear in wordlist. You learn about the secret by guessing. A guess must be one of the words in wordlist, and calling match(guess) gives back an integer k: the count of indices i at which guess[i] == secret[i] (that is, letters that agree in the exact same position).…