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 was feeling clever for using the sum of numbers formula and eliminating the need for an iterative method, but damn that's slick.
For such a short string is not something to bother about, and it feels cleaner for this specific problem
exactly my thoughts!
I totally agree with you. This is where the work is done in an array within an array. I saw a great solution here via replace and regExp
It will be considered part of a word and just stays as it is. But the tasks specifies that the input consists only of letters and (single) spaces.
Not all nested loops are inherintly O(n^2). And it is a case here as I explained here
Who the h..l selected current solution as "Best practice" ? Does anybody measures execution time of the functions in here and resources usage ?
or even READABILITY. Give me a break .
Very impactful.
Cool solution! You can also store the number of terms on a variable to make the return statement more concise. Also, min and max can be const since they aren't changed/reassigned.
Nice
Ooops, killed my solution!
Why not just use a separator
It's easier to read and look that way
April fools
This comment is hidden because it contains spoiler information about the solution
Very nice solution, but I don't prefer use regex and replace because for long string is not very good for performance
Loading more items...