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.
I thought I was the only one.
Imagine you do the following (that may not be the thing you must do actually to solve the kata cause it could be too inefficient, but to help you understand):
I didn't do much more than rewording the description. If it's still not clear it may be that it's hard to explain it more easily...
me too
me too
me too
You can change
if (c == 1)
forif(c)
. It will look more pro :DI don't understand this kata
wtf
that's right, ty
The problem is in this line, passing by reference:
That's where the compiler throws that error, maybe those playgrounds use a different PHP version? In this kata the only version available is 7.0 right now
This comment is hidden because it contains spoiler information about the solution
Not a kata issue, read this please: https://docs.codewars.com/training/troubleshooting/ and post your code as instructed there if you need help with it.
That error is caused by your code.
This comment is hidden because it contains spoiler information about the solution
That error comes from your code, not a kata issue, please, read this: https://docs.codewars.com/training/troubleshooting/
RangeError: invalid array length