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.
This problem doesn't always work on random test cases, in scenarios where (i >= 10). If the shoal has a pattern that matches a 2+ digit number, (shoal.split(i) - 1) would be greater than 0, and would add fish that don't actually exist (since fish in the shoal are only size 1-9). Otherwise using .split() is a really nice way to parse the shoal.