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
you don't really need the first null check since it would be cought in the second null check ¯_(ツ)_/¯
Oh yeah, you could also convert the numbers to strings to see the positions of the bits... I wish I had though of that XD
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)
Is there any reason you use "foreach (int i in Enumerable.Range(1, array.Length + 1))" instead of a normal for loop? I think that part makes the code a little less readable than it could have been.