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.
This comment is hidden because it contains spoiler information about the solution
Nested loops are what cause the O(n^2) behavior!
I suggest looking up "memoization" and seeing if that coding practice can help eliminate the need to do multiple passes over the list in question. :)
It's 2M if you are lucky.
For python it's ~1.5 mil, don't know about JS (probably similar)
me too!
These are the correct, complete memories from the Sample Tests (each length ==
10
):Above you show arrays that have only
6
words each, but while they may share some words, they do not match the actual sample tests. So, if you are using those smaller (different) arrays in your own environment, you should not expect the same results as on codewars.When your code is run against the sample tests, it is clear that it fails two of the tests. Take another look at your code with those two tests in mind. You will have to match the tests on codewars to pass the kata.
If you find any hard evidence of kata failure, feel free to re-raise as an
issue
if you can provide: the correct tests, the expected output, your output, and an explaination of why there is a problem. Thanks.