Ad
  • Custom User Avatar

    Haha, definetly no.

    I am a one-liner just for fun. I have solved most of the katas with one-liners.
    It made a little bit harder to solve the katas but I learn a lot with this. :)

  • Default User Avatar

    My initial instinct was to implement something similar to yours but decided the code was too complex and doing too many unnecessary calculations. So I switched it to a simple substitution and capped my table to meet the requirements of the kata (actually I over-engineered it by one entry). This doesn't make mine right and yours wrong, we're just solving it around different priorities.

  • Custom User Avatar

    Remember that there can't be more than 3 identical symbols in a row.

    There is a limit in the input range (or should be) for that to be true.

  • Default User Avatar

    I'd probably do a couple of things differently if this was production code, but I would keep the symbols in an encoding table. Why calculate the same values over and over again?