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.
The break is irrelevant here because return already ends the function's execution.
clevier
The description should mention that the expected return values are all in lowercase. In fact, the whole description could use a facelift. Here's a quick suggestion:
"This Kata is meant for beginners.
You are given a number between 1-12 and you have to return name of the corresponding month in lowercase.
The input will always be valid.
Example:"
You can easily ommit a break (or any other code) after a return statement
Comparing values is neither novel nor interesting idea.
Comparing values is not a novel or interesting idea.
Fixed.
Python translation. Have slightly improved description, contains 50 random tests
php does not care
Thats right
The /../ part of the code represents a Regular Expression (RegEx) that looks for any 2 types of characters. If the length is even, When it comes time to check for the last character (i.e. the underscore) it will not be able to find another character after it, and thus won't add it to the resulting array.
I get confused when the string is even, why the match method doesn't match the underscore character?
This comment is hidden because it contains spoiler information about the solution
It is not returning a string :P
Your solution is faster but eats a lot of memory. At sandbox.onlinephpfunctions.com your solution with n = 5000000 runs of ouf memory.
Loading more items...