Ad
  • Custom User Avatar

    AH! I overlooked the subtlety of the known digit! Thanks for the hint.

  • Custom User Avatar

    Ths FSM given in the referenced link: http://aswitalski.github.io/img/FSM-binary-divisible-by-five.png, of the problem description is incorrect; this, because the "101" string, stipulated in the problem description as correct, is not accepted by the FSM: starting from state 1, a one is read to transition to state 3; reading a zero in state 3, transition is back to state 1; whence a read of one therein re-leads to state 3. But, state 3 is not a final state.

  • Custom User Avatar

    There is no problem with those tests, and it's been explained several times, read my reply to TEBESKASHI's post below. 1 is already there, so it can't be the unknown digit.

    All of the ?s in an expression will represent the same digit (0-9), and it won't be one of the other given digits in the expression.

  • Custom User Avatar

    Yes. I also got the same problem: <2> expected but <1> found.

  • Custom User Avatar

    The Kata has a problem in the test cases: 1) assertEquals( "Answer for expression '?*11=??' " , 2 , Runes.solveExpression("?*11=??") ); and, 2) assertEquals( "Answer for expression '??*1=??' " , 2 , Runes.solveExpression("??*1=??") )

    Each of the test cases: 1) and 2), should be matched against unity (1) and not 2; this, because the problem description says to choose the smallest found solution: 1 is the smallest solution solving both ?*11=?? and ??*1=??