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.
Looks good to me. Thanks everyone! :) Marking as resolved.
OP's solution works now, so I guess yes. But you can wait for OP's confirmation if you will.
Python:
Missing solution import in sample and test section
Ruby 3.0 should be enabled
CLosing!
Language: C++
Test suit missing required headers
std::string|std::vector
JS
Node 18.x
has been enabledFork approved. Will I mark the issue as resolved?
The problem is that there is a hole in the array between "strong" and "lyal". Most probably a copy/paste mistake. A bit difficult to spot because most solutions test only for equality, which works for
undefined
.Please see the JS fork for fix.
I am none of the JS translators. I posted the last one (@hobovsky, see below his posts about his kata updating).
Personally I don't see any problem with the case you submitted.
Please can you give a look at the post from @j-sea (https://www.codewars.com/kata/550554fd08b86f84fe000a58/discuss/javascript#63edec41703d04004aabc74d) ?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Because the description of the problem describes the array argument as being potentially very large, iterating over the array manually like in this solution is preferred because it will take advantage of short circuiting out of the iteration.
If you use [].forEach, [].filter, [].reduce, etc., then you'll be iterating over potentially millions of numbers when you could have potentially returned after index 2.
Even worse, if you use [].filter or manually populate additional arrays, you'll be doubling the memory used without needing to.
Even worse, you'll encounter the issue of the [].filter/manually-created arrays needing to be resized as they get larger and larger, populating the garbage collector with even more memory without needing to.