Score a Secret Number Guess
Asked at Shopify · Coding Questions · Difficulty: Medium · Last asked Jul 15, 2026
In a number-guessing game, one player picks a secret number written as a string of digits and the other player guesses a string of the same length. After each guess the game reports two scores: how many digits are in the right place, and how many digits have the right value but are in the wrong place. Implement this scoring.
Loading the problem…