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.
My initial solution did not correctly test for leading zeroes for triple or greater question marks yet passed the test cases.
(i.e. it thought that 0 was the correct return value for "????+????=????")
The Details specify that the output should be 0 <= n < 100, but this is never tested. My two current solutions either output very large numbers or only negative numbers and both were accepted as valid solutions.
What makes a test case a "corner case"?
I misinterpreted
2. However, if the player has entered a input that does not match the next input in the sequence, he has broken the streak and he has to start again, from this input.
The random test cases are broken in javascript. My solution passed without even returning a value for the random test cases.
The line that needs to be fixed is " Test.assertSimilar(testArray.sort((a, b) => a.length > b.length),testArray);
".
Could you please explain the algebra? I've been staring at this algorithm and can't figure out how/why it works.
Thanks.
Thanks for the link. It helped (eventually.)
.split("")
isn't necessary. (It was a forgotten left over from my solution for the easier Coloured Triangles kata.)case 2: return triangle3(row[start], row[start + 1]);
is also unnecessary because it will be handled by the default case. (Hardcoding short row lengths does appear to give a slight performance boost.)Before Fibonacci, the Western world had a didn't advance...
should read
Before Fibonacci, the Western world didn't advance...
Thanks
My code works now!
In the hiragana alphabet tests
が
is part of the keyひらがな
, but is not part of the alphabetあいうえおぁぃぅぇぉかきくけこさしすせそたちつってとなにぬねのはひふへほまみむめもやゃゆゅよょらりるれろわをんー
. I suspect that the code you are using to generate the test case is using indexOf() without checking for -1 on any key value because the last character encryption expected isな
toと
.convert(forward, backward) and convert(backward, forward) do exactly the same thing; it doesn't matter what order you pass in those arguments. In fact this.encode and this.decode should be the same function.
Please be more explicit that the pair [a,b] is to be applied both a->b and b->a on both encryption and decryption. At first I tried a->b as encryption and b->a as decryption.
Otherwise it is a nice and straightforward kata.
I believe the most upvoted solution fails on
darkRoom(3)(1)(1).end();
and similar cases.Loading more items...