Ad
  • Custom User Avatar

    That is a valid solution. The Python translation has been updated accordingly, thanks.

  • Custom User Avatar

    I suggest reducing the number of hacks to minimum and make sure that your basic k-means algorithm handles short tests well.

    When this kata was created, scipy was not available here on CodeWars, so there was no "usual implementation", so the original solution has k-means implementation of its own, and it was a kind of a point.

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