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.
Then your code is not correct, you're trying to read the length of something (null) that hasn't that property. You need to check what the value is first.
the error is : Cannot read property 'length' of null. But all the test are fine. Help me please.
Would you mind reading the error..? And telling us what it is? :P
Hi, the test cases do pass null for one of the arrays in a couple of tests, so you can't make the arguments required unless you supply a default value. As far as your tests not passing in the test case, are you by chance modifying the source arrays in your code? The arrays are passed by reference so modifying the arrays in the random tests could affect how the reference solution behaves in the test suite. Can you be more specific about which test is failing when you run your code?
This comment is hidden because it contains spoiler information about the solution
Welcome Andrey, please, mark your posts as having spoiler content when posting code like that and also read how to use markdown formatting so your code doesn't lose indentation.
To debug your code use print. About your code, you're comparing two lists with
==
, that's not "regardless of the order". Maybe there are more problems once you fix that.This comment is hidden because it contains spoiler information about the solution
I was able to finish this kata with an algorithm, that doesnt fit the description, because the test are not good enough.
It is. I just finished it