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.
Your solution has a bug and works incorrectly for some inputs, depending on order of intervals. See these intervals which should sum up to 19:
The strange behavior of tests you see is because in this challenge, for some reason, tests always shuffle inputs before calling your function. This is why your solution sometimes passed, and sometimes fails: because tests sometimes generate inputs which trigger the bug in your solution, and sometimes not.