Ad
  • Custom User Avatar

    Thanks @maxiu. I fixed and re-submitted. You should raise a suggestion to add your example test case.

  • Custom User Avatar

    Leading-zero detection is broken, it will not detect 0[1-9]+ numbers. For example this test will fail:
    assertEquals(-1, Runes.solveExpression("2*1=?2"));
    with:
    java.lang.AssertionError: expected:<-1> but was:<0>

    Instead of
    for (final int i : new int[]{0,1,2,3,4,5,6,7,8,9})
    you can do simply
    for (int i = 0; i <= 9; i++)

  • Custom User Avatar

    += operator on String is a bad coding practice, always use StringBuilder (or StringBuffer if you need synchronization, but 99.99% you don't).