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.
Didn't know about
Math.isInteger
, lolThis is insane how the most simple solution (even naive) is the most robust out of all :D
This solution doesn't work for some legit cases, e.g.
1111111111000000000111111111100000000001111111111000000000111111111
This is quite obviously 4 dots, i.e. "I", but...;)
I would largely disagree with this solution as its complexity is not based on the size of the input, but rather on the contents of the input. In other words an input as simple as a single interval from 1 to 9007199254740991 will lead to enormous amount of operations and enormous memory consumption.