Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Leetcode 843. Guess the Word
Given a list of unique six-letter words and an API that, for any guessed word from the list, returns the number of characters that match the secret in both value and position, identify the secret within a limited number of guesses. The core challenge is designing a guessing strategy (e.g., minimax or information-gain elimination) that efficiently prunes candidates based on match counts to guarantee finding the secret within allowedGuesses.
Asked at:
Amazon
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Early December, 2024
Amazon
Mid-level
Maximize probability of guessing a secret word in 5 tries. Given an interface with isValid(char c) and getWord() methods, implement a function to guess the secret word consisting of uppercase characters. Initially, getWord() returns a string with special characters that get replaced as correct guesses are made.
Late September, 2024
Mid-level
Guess the password: Given a set of tuples, determine the unique possible password. The password is max 7 characters long, characters are not repeated, and their order must be maintained based on the input tuples.
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.