Ad
  • Default User Avatar

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

  • Custom User Avatar

    I've noticed that several of the accepted solutions work only for max two passes. They are accepted because all unit tests for the solution have cases that indeed require only 2 passes. However, it is possible that calculating the result may require three passes (e.g. for Sep 29 1999). I think such case should be added to the test suite for this kata, to catch invalid, hardcoded solutions.

  • Default User Avatar

    This solution is invalid - it assumes there are at max two steps.
    In the case of Sep 29 1999 there will be 3 steps:
    1.) 9 + 2 + 9 + 1 + 9 + 9 + 9 = 48
    2.) 4 + 8 = 12
    3.) 1 + 2 = 3
    Maybe such edge case should be added to this kata unit tests?