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.
Oh. And.
Please add random test cases.
I have taken the liberty of correcting some glaring spelling and logic errors in the description and the tests. Hope that's OK with you.
What is the added value of testing for invalid inputs? It adds one line of code to the solution and it has absolutely nothing to do with the calculations. I would suggest testing with valid inputs only, and specifying such in the description.
Also, operators apparently are placed between numbers only, and not in front of the first one. But we have to infer this from an example. It would be perfectly possible to have a
-
in front of the first number (and it might give more possible solutions). I would suggest explicitly specifying possible placement of operators in the description, not only that they don't go in front of the first number, but also what happens whento >= 10
- can we put+
or-
in the middle of10
or11
, or not ?Otherwise - fun kata! I was worried the number of possible answers would get out of hand in a hurry, but that remained quite managable. Thanks! :]