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 comment is hidden because it contains spoiler information about the solution
I dont think its O(n^2) because there is only ever 2 numbers in this problem. so I think its maximum O(2n) and minimum O(n).
In Python at least.
Part of this kata is to find out how long a single unit of time is.
In "11100010101010001" there are multiple cases of single '1' and '0', which means a single unit of time is 1 character.
In "111" a single time unit is 3 characters. (though we only know this because we are supposed to assume . over -)
Also notice that they in the details of this kata has an example where the time unit is 2 characters.
(I removed starting and trailing zeroes from your example since we are supposed to ignore them)
your list contains an empty string, I bet.