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.
Because it uses greedy evaluator (.*)
Dot would be ignored in case of lazy evaluator (.*?)
Good job, I voted for clever too.
I voted for clever, because this scales with the interval lengths, not the count of the intervals. So if you want to have large intervals, this can be slow:
echo sum_intervals([[0, 40000000]]);
Yet readability is A+ :)
wtf i did the same at first, but it didnt work :(