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.
Please, stop mark this code as a "Best Practice". It hasn't nothing in common with adequate coding practices. :)
This comment is hidden because it contains spoiler information about the solution
Actually, the absolute majority of programming topics are more or least hard before you spent some time and mental efforts to dive into them. For this particular subject I recommend you "Mastering Regular Expressions" by Jeffrey E. F. Friedl, as a good fundamentals. 👍
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
But only for 32-bit signed numbers (from -2^31 to 2^31 - 1). Out of this range the result will be different from expected.
This comment is hidden because it contains spoiler information about the solution
"i" -- point-free? :)
This comment is hidden because it contains spoiler information about the solution
💥👍
You are right, in general. But theoretically, if we are in environment which is restricted by RAM, additional memory allocations sometimes are not desired. Secondly, perhaps authors supposed that caller code is responsible for immutability, by cloning passed arrays, for example. Lastly, cleverness also counts, and sometimes we're sacrificing best practicing for higher cleverness (less code in current case). 😉
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I think that one of the characteristic of well done kata is when it can be solved in different clever ways. Thanks for great kata! 👍
Loading more items...