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.
Readable and ideomatic.
Not performant for large arrays. But that was not required in the description.
So "best practice" from me
Great. Performs for big arrays. And readybility is good too, whenever I prefer a variable like 'offset' for 'i+1'.
Contrary to other comments, I like this soluluton. Of course it doesn't perform on large arrays. But there is no "large array warning" in the description. And the code is clear, readable and ideomatic. So for me the high score on 'best practices' is deserved.
I struggled with the same problem with the spaces and like your workaround. Clever.
The more common and probably better solution is to use split(' ') instead of split().
Takes care of the spaces and works even if the word distances are not consistent.
Algorithm is efficient because it stops early. Code is good to read despite the extra lines for the early stop. I like it.
Took a bit of time to understand. Feels a bit magical that you can do it like this!
Clever, but I would definitely not call this a best practice.
This is clever but I wouldn't say it's the best practice.
That is because it's relatively harder to understand at first glance (when compared to some other solutions).
That was the case for me to say the least.
Great solution!!
superb bro!
the way you tried to boil down the numbers from n digits to 1 digit by dividing the number with 10 and then taking mod 10 will gives us the reminder .wonderful!awwesome!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
So fucking great!
Integer division for 11/10.
I just started studying recursion and this is so cool. Brilliant!
Loading more items...