Ad
  • Custom User Avatar

    Thanks for pointing that out!

  • Custom User Avatar

    It seems, my half-baked solution slipped through tests due to the fact that at that moment random tests was formed without any upper palindromic boundary values.
    You can provide tests in which at least one of the boundariesis guaranteed to be a palindrome itself: (111, 2222), (123, 3333), (111, 2345) and nothing will accidentally slip through. )

  • Custom User Avatar

    Haha, it's OK! It finally dawned on me what it was all about and I’ve already optimized even my final solution, but I won’t republish it - I’d rather celebrate it with a couple of glasses of cognac - no one can drink away the talent for being a little stupid! Cheers!

  • Custom User Avatar

    Thank you for completing my kata! I especially loved the process of creating this one.

    Unfortunately I can't remove solutions, but I'm glad you submitted a final solution after debugging.

  • Custom User Avatar

    BTW, is it possible to remove the fisrt debug version of my solution

    nope, sorry... ;)

  • Custom User Avatar

    Not easy but incredible fun - I couldn't asleep a couple of nights :D
    Thanks for the great kata!
    PS: BTW, is it possible to remove the fisrt debug version of my solution, that didn't pass all the tests and has been unecspectadly published by clicking on the button, that was changed from 'attempt' to 'submit' at that moment?

  • Custom User Avatar

    Thank you friend! You rlly saved me from complete ASS madness :D

  • Custom User Avatar
  • Custom User Avatar

    The initial Kata input constraints do not require this, however, here is a solution in a more general form, which covers (it seems) all the expanded cases with the long digits and unnested parenthesis:

    solve("121(a2(b)a)")
    solve("33(A2(B)A)")
    solve("k(a3(b(a202(c))))")
    solve("a2(b)c2(d)")
    solve("a2(b)c14(d)")
    and even with zero:
    solve("a2(b)3(c0(demonicstring))"

    Cool Kata, thanks for the fun!