Ad
  • Custom User Avatar

    Interesting approach. It seems to be more efficient comparing to keep-history way. Especially for huge sets. It consumes no memory and complexity is almost linear.
    Thanks for the inspiration.

  • Custom User Avatar

    Nice one. Thanks.
    Would be better suited in a class, I guess.
    And automatic move could be next kata/method :)

  • Custom User Avatar

    The same case. It seems to be a typo in the test definition.

    • As ptya writes encoded text can't be lenger than input
    • Encoded text, marked as failed result, can be reversibly decoded

    To encode: どもあみがとございまぬ
    Encoded: どしららがろござやまぉ
    ERR:Expected: どしららがろござや���ぉ
    To decode: どしららがろござやまぉ
    Decoded: どもあみがとございまぬ

    Nice kata, thanks :)