Ad
  • Custom User Avatar

    Hey, thanks for the feedback.

    While you are correct consider that there was no expected behaviour specified, e.g. should we return null oder string.Empty, which is the reason for me letting the method raise an exception in the case of the parameter being null.

  • Custom User Avatar

    Well I have to kindly disagree as the kata does not specify it that way.

  • Custom User Avatar

    This solution will fail if the argument (cc) == null => Calling Length property will throw a "System.NullReferenceException: 'Object reference not set to an instance of an object.'"

  • Default User Avatar

    It's not a valid solution. You have to check for exact triples and exact doubles.
    (9991212121212, 1212991) => 1
    (9999999999999, 9999999) => 0 (method above returns 1)