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.
Brilliant idea!
The readability can be improved looping through elements on the array, not with the use of the index. Suggesting using foreach loop.
These round brackets around the condition are not really necessary. However, the simplest solution to me.
This comment is hidden because it contains spoiler information about the solution
Curly brackets in a string template are redundant for that particular case.
This comment is hidden because it contains spoiler information about the solution
It is better to use LinkedList when you add nodes frequently to the list's end, because this operation runs O(1).
It may be a solution that comes in mind at first, but it is not the most efficient one. Please check overview at project euler solution to understand that i can be simplified to equation with O(1) memory complexity.