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.
You should check
Getting the same error in PHP. It's happening because one of the random tests expects a wrong answer. Keys should be increments of 1 starting at 0, but the random test asks for keys incrementing by 2.
That's because while the values in the array are the same, the keys aren't.
Same here. I'm getting a message about failing 1 testRandomCases.
[testRandomCases
Failed asserting that two arrays are equal.]
I don't understand what it means.
Here is the relevant section of the Codewars troubleshooting guide:
My solution works on my machine, but not on Codewars
Same here. My code works on localhost, but not in here.
Print the input, see what the error means. This test could match that error message:
The tests aren't broken, your code is wrong. In PHP, the modulo operator converts both operands into integers before returning a result (which will also always be an integer), you'll have to find another way.
This is not a proper way to raise an issue. Please read the documentation: https://docs.codewars.com/training/troubleshooting/