Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    I would like to see a "downvote" option. Perhaps moderated to avoid abuse, and requiring a justification for the downvote. I see bad solutions upvoted as best practices, and that's not healthy for a learning tool.

  • Default User Avatar

    I note that most answers in languages that allow null values for the pin parameter do not correctly handle the null case. And while I would not use a Regex to solve this problem in real life, the title of the kata indicates that this regex are to be used -- TryParse or its ilk are not valid answers.

  • Default User Avatar

    This is a mostly correct solution. If pin is null, then this implementation will throw ArgumentNullException, which violates the specification that the function return false for any input other that 4 or 6 digits.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution