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.
in that case in order to passe the tests we shall do to int conversion, will it still be the best practice for this exercice? I used " function summation($n) : int "
That's great. But to better protect against overflow with very big $n, i like to write it as "$n/2 * ($n+1)", this way $n will never multiply with $n+1 before the division.
This is the best practice
This comment is hidden because it contains spoiler information about the solution
Why does this work?
you can simply return strpos($v, (string)$d) !== false
Hello. What about this rule "Beware: r must be without duplicates."?