This question evaluates algorithmic problem-solving, combinatorial reasoning, and information-theoretic search strategies for narrowing a secret from a candidate set using match-count feedback.
You are given a list of unique words, each with the same length (e.g., 6 lowercase letters). One of these words is the secret.
You can repeatedly make a guess by choosing a word from the list. After each guess, you receive feedback: the number of positions where your guessed word exactly matches the secret word (same character and same index).
Design an algorithm that finds the secret word within a limited number of guesses (e.g., at most 10), by choosing guesses adaptively based on feedback.
0
to
L
where
L
is word length.