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.
It's
expected your answer to equal expected answer
, so the expected value in the error message is 1 not -1. -1 is the value your function returned. Not a kata issue.Locally you're not using the same input from the tests, not a kata issue.
In your code, with that input value
before + rotors[i]
makes no sense,before
is a number androtors[i]
is either an array orundefined
depending oni
value.Add this
print(g, m, n)
as the first line instep
function and you'll see the input. Check this out: https://docs.codewars.com/training/troubleshooting#print-inputThe problem is in your code, it ignores the boundaries and returns numbers outside the range
[m, n]
.Language, values, Sample tests or Attempt tests?
It's not a problem in the tests, try calling your function locally like in the tests, that is, one after the other:
And see what you get.
Have you tried locally calling your function more than once? The problem is, memo isn't reset, it keeps its value. Also
point
being a concatenation of x + y, how would you distinguish between '11' + '10' and '111' + '0'?Sure, but read this first: https://docs.codewars.com/training/troubleshooting#post-discourse
And what's the code that does that?
First thing first, don't change the function's name, the tests will look for
count_by
.The test is fine, read the description again.
Node v18 is enabled now. Closing.
No:
It's been already discussed 4 years ago: https://www.codewars.com/kata/52d1bd3694d26f8d6e0000d3/discuss#6050b777d2342a000e60697f
Because:
Did you read this yet? https://docs.codewars.com/training/troubleshooting
Loading more items...