Ad
  • Custom User Avatar

    I noticed that an edge case is only (occasionally) covered by the java random tests. I would suggest adding this test case:

    {{0,1,0,0,0,0,0,0,0,0}, {0,0,0,0,1,1,1,0,0,1}, {0,0,0,0,0,0,0,1,0,1}, {1,0,0,1,0,0,0,1,0,1}, {0,0,0,0,0,0,0,0,0,1}, {0,0,0,0,0,0,1,0,0,0}, {0,0,0,0,0,0,0,0,0,0}, {1,1,0,0,0,0,1,1,0,0}, {0,0,0,0,0,0,0,0,0,0}, {1,1,1,0,0,0,0,0,0,0}}

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I especially liked tinkering with the simplifications. You could play with that forever...
    So I left out the simplifications like (+ 1 (+ 2 x)) -> (+ 3 x) and (* 2 (* 3 x)) -> (* 6 x) because the tests seem to accept both.

    Very happy with my solution, although it is a 'bit' longer than the most upvoted ones (hopefully I compensated with readability)...

  • Custom User Avatar

    It's perfectly valid? It spells '. ..' which translates to 'EI'

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Can't decide if my interpreter is overdesigned for the language or if the language is underfeatured for my interpreter... Probably the former ^_^'

  • Custom User Avatar

    Slightly disappointed that the Oxford Comma is not accepted

  • Custom User Avatar

    The random strings tests are borked - it expects nonempty results for clearly invalid expressions (eg. a trailing | ).
    The solution is to just repeatedly attempt until the random strings pass... So I don't really see the point of these random string tests?

  • Custom User Avatar

    I was not amused by the ambiguity of eg. "pop a and b, and push b / a"... is a the top of the stack, and b the one below that, or vice versa?!

  • Custom User Avatar

    The programming effort isn't that hard but I hate how poorly this task is specified :(

  • Custom User Avatar

    @snmzcm to answer your 'question' - you've made a slight logical mistake (or perhaps you misread).

    If A ends with B, then yes, that implies A also contains B. However, the converse is generally NOT true: if A contains B, A does NOT necessarily end with B.

    The kata specifically asks to determine if A ends with B, so only testing whether A contains B is simply not sufficient.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution