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.
TypeError: text.findLastIndex is not a function
I know that this method was added in Node.js 18.0.0, but why isn't this version available for this kata
Bro, i wrote this comment 5 months ago, i have already solved this kata
O(n) + O(n) + O(n) is also O(n)
This comment is hidden because it contains spoiler information about the solution
fixed
fixed
My solution is wrong, i just checked if it's gonna work. i didn't solve the kata. can someone delete this kata from my completed ones.
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
["Once upon a midnight dreary, while100 I pondered, 9026315weak and weary -827&()","Unlucky"], - Why don't we count 0 as a 'Hidden cubic number here' like in example below?
["Once 1000upon a midnight 110dreary, while100 I pondered, 9026315weak and weary -827&()","0 0 Lucky"],
Why do you say so? In the first example it counts.
why 1 doesn't count as a hidden cubic number?
Why would you replicate Python's range in Python? It's already a built-in there. That makes less sense to me. Yes, I agree it's confusing, but you only can assume if you receive two arguments, they're the first 2, and never the last 2 (just like Python's range).
Loading more items...