Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    you don't really need the first null check since it would be cought in the second null check ¯_(ツ)_/¯

  • Default User Avatar

    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

  • Default User Avatar

    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)

  • Default User Avatar

    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.