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.
Just realized I forgot to remove the unused imports XD
This is what I was trying to do the whole friggin time! Gave up and used an enhanced for-loop. Oh bother
While loops be damned!
The order of the assertion should be
expected, userResult
.Please, add some notes/comments that if there's any space at the end of each line, they should be trimmed
Why is the result must be ended with
\n
(new-line)?There's no explanation as to what to do when the number is below 1, yet you add it to the test cases
The only explanation you have is this:
Which is ambiguous since there's no explanation what's the "smallest" input.
You don't even have any tests that the input goes beyond 100, why adding this?
This has been fixed. Thank you for the comment!
No random tests.
This comment is hidden because it contains spoiler information about the solution
mapToInt!!
Right?! XD
Hey we both named our helper methods validate!