Ad
  • Custom User Avatar

    No, that's not true. You would find this out if you solve the kata.

  • Custom User Avatar

    There is no valid reason to assume that 111 is a dot.

    if you have trouble discerning if the particular sequence of 1's is a dot or a dash, assume it's a dot

    There is no trouble, because 111 directly translates to a dash.

  • Custom User Avatar

    Closing due to no objections from the issuer.

  • Custom User Avatar

    Would you be willing to reconsider that requirement (or just re-write the tests so that it doesn't matter)?

    After 1211 successful completions? Sorry, no, definitely not.

    The greatest common divisor approach is really not the one that was supposed to be used here. Moreover, the GCD approach would also not help you with neither 111 case, nor any other case consisting of dots only or dashes only.

    The main idea is this kata (as well as the previous one) are precursors to the third kata in the series, which pretents to simulate the real-life scenarios. So this kata, on purpose, stimulates the approaches that would be useful in the third kata and discourages the ones that won't be.

  • Custom User Avatar

    There's no reason to suppose the single 111 is a dash. In fact, it could be a dash with transmission rate 1 or it could be a dot with transmission rate 3.

    The kata description explicitly states: "if you have trouble discerning if the particular sequence of 1's is a dot or a dash, assume it's a dot".

    Therefore, it's a dot.