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.
C#: method name should be
PascalCase
(Please refer to implementation of backward compatibility here )nitpick: a minor typo in the description
string as a param[E]ter repres[]enting the expression
.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
One of the tests (which returns an error) says:
"assertEquals( "Answer for expression '?*11=??' " , 2 , Runes.sol_____________veExpression("?*11=??") );"
Is that giant space supposed to be there?
Apart from that, I am receiving errors but unable to think of test cases that invalidate my code.
I got a test case with the following expression:
"?08644-464194=244350", which expects 7
But:
708644-464194 is 244450, and not 244350. Am I missing some detail here?
Go translation (author is inactive).
Rust translation (author is inactive).
In Elixir, some test cases seem broken. All sample tests pass, but some later test in the full suite always fails, expecting a result of 0 when there is no correct result (-1).
Example:
In this case, not only does 0 not solve the equation, but it also goes against the rule that no number will start with a zero.
This comment is hidden because it contains spoiler information about the solution
Very nice challenge, thank you for the kata. For the longest time I thought the edge case involved a number going out of the range [-1000000, 1000000], but it appears no test case actually checks for this (correct me if I'm wrong). Perhaps remove the range from the description? In my experience it did not contribute towards solving the challenge (C#).
The Expression "-00?*?=-?" should be tested for because negative leading zeros should not be allowed when positiv leading zeros are rejected.
Both Top Solutions break for this Expression.
Need more basic tests. Top voted solution does not test for basic cases such as
"?1+1=2"
,"1+?1=2"
and"1+1=?2"
. Both should evaluate to-1
, but top solution evaluates to0
.More random test cases couldn't hurt either.
Ruby translation without random tests... feel free to improve with them.
Please review and approve.