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 thought a solution had to be correct to be posted here?
This comment is hidden because it contains spoiler information about the solution
It might be helpful to specify what to do about negative numbers, or include a test case for them.
Specifically, since the description said "integers" and not "positive integers" or "natural numbers", I scanned for /-?\d+/. This caused my code to fail on a randomly generated test case that included a dash before a decimal digit.
Oops. Bloated, comment packed trash.