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.
because you used ofindex() function which makes solution o(n)^2 complexity
Because no one has rewritten code of tests to upgrade them from Node 8-compatible to Node 18-compatible.
O(n) + O(n) + O(n) is also O(n)
Read the notes part about what to do when there are more than 3 digits next to each other.
I'm not sure I understand your question - according to kata description both 0 and 1 do count as cubic numbers.
For example, in the first input you just gave, I find (by looking, not with code) the following groupings:
100, 902, 631, 5, 827
in the second:
100, 0, 110, 100, 902, 631, 5, 827, 0, 0
are you sure that your code correctly finds those groupings? Print your current returned output so you can be sure (if you want clearer help you should post comments such as: "On input abc my code returns xyz - why is this not correct", because at the moment we can only guess what is going wrong.)
Alternatively, make sure you are reading the correct error messages for the correct inputs - you can do this easier by printing the input:
https://docs.codewars.com/training/troubleshooting/#error-messages-and-printing-your-inputoutput
Why do you say so? In the first example it counts.
I don't know what you mean, you have this line:
if(step == 0){return 2}
and one test fails with this error message:Test failed for range(0,2,0): expected 2 to deeply equal [ 0, 0 ]
so it's not ignoring it as you say it does.What's this?
Use logical operators.
I'm over here like an ape wishing I was a grandma...
This comment is hidden because it contains spoiler information about the solution
WTH, that's an insult to Grandmas all around the world.