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.
.
Print the input and you should see why they fail.
This comment is hidden because it contains spoiler information about the solution
Please make a clear suggestion of improvements to the description, or this suggestion is just not one. It has been said many times: people are numerous for complaining and criticizing but at the time of making concrete improvements, most of them just repeat the description with some unsignificant variation. I encourage you to browse this page and see by yourself. This is wearing.
Try running this and look closely at the value of index 1 -in both arrays.
let array1 = [7, 4, 6, 8, 0, 5, 1, 0, 3, 7, 4, 9, 2, 8, 3].sort((a, b) => a-b).map((v) => v * v );
let array2 = [25, 36, 4, 0, 16, 9, 1, 64, 1, 9, 81, 16, 49, 49, 64].sort((a, b) => a-b);
console.log("array1", array1);
console.log("array2", array2);
They aren't the same. When given these two arguments the function should return false -although it's not the clearest from the description.
I should have been more explicit about what my suggestion is.
My suggestion is to add something to the kata description that lets people know about the requirement described above -that the reason why some code fails a handful of the random input tests is that they aren't matching the number of instances of a squared root.
Tests are fine. Please stop spamming.
Most likely confused. It's not that difficult, but 4 tests out of 200 did not pass my code above.
This comment is hidden because it contains spoiler information about the solution
No, that's a problem with your code, not a kata issue. Read this: https://www.php.net/manual/en/function.array-search.php
Sample test suite gives "Failed asserting that false matches expected true." Full test suite only fails on duplicate fixed tests; other tests pass. Using PHP translation.
ok, sorry
I think you'd better use markdown tags to format your code or it's not usable. Refer to the documentation about this and more: https://docs.codewars.com/training/troubleshooting/#post-discourse
Also, Discourse page is not the right place to discuss a solution if it was your point.
Please use a spoiler flag when you post code, so that users who didn´t solve the kata cannot see it; I put the flag for you this time. Also use markdown tags to format your code or it's not usable. Refer to the documentation about this and more: https://docs.codewars.com/training/troubleshooting/#post-discourse
This comment is hidden because it contains spoiler information about the solution