The problem statement misleads you on the possible lengths of each input

  • 1

    You write a 4-digit secret number and ask your friend to guess it.

    This implies both inputs are length 4. The examples are also both length 4. It is trivial but unfair to expect support for inputs with length not equal to 4 (especially the length 0 case).

  • 0

    Hi, Wikipedia says "The numerical version of the game is usually played with 4 digits, but can also be played with 3 or any other number of digits.", I should have mentioned that clearly in the problem description, thanks for the feedback!

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.