Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Thanks @maxiu. I fixed and re-submitted. You should raise a suggestion to add your example test case.
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++)
+= operator on String is a bad coding practice, always use StringBuilder (or StringBuffer if you need synchronization, but 99.99% you don't).