Ad
  • Default User Avatar

    is there a reason to not leaving a space? like why cramp them together instead of

    return position + roll /* 2

  • Custom User Avatar

    only leave should_work_for_random_tests fail, why?

  • Default User Avatar

    Nothing unresolved remaining.

  • Custom User Avatar

    Seeing that you've eventually solved this without segfaults, do you wish to resolve the outstanding issue or is there something still unresolved?

  • Default User Avatar

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

  • Custom User Avatar
  • Default User Avatar

    I had simular issue. You should check if you processing correctrly cases where more then two chained operators. Like a < b < c < d.

  • Default User Avatar

    Example ((a != b) > c != d) < e < f can be rewritten as a != b && b > c && c != d && d < e && e < f. Operator != isn't special, it's like any other operator.

  • Default User Avatar

    I thought my solution is the ugliest...

  • Default User Avatar

    I've passed all tests except random with results:

    Expected: false
    Actual : true

    That's not too much clear. In most katas we can make debug output of incoming data, but here incoming data is the expression itsels.

    Then question: how can I see the case I failed on?

  • Default User Avatar

    What is the expectation of the mentioned example in the description: ((a != b) > c != d) < e < f
    Let's assume a,b,c,d,e,f distinct numbers greater than 1. Should then (a != b) be true, (true (1) > c) be false, (false (0) != d) be true, (true (1) < e) be true ?
    Then (under the given assumptions) the expression would break down to (e < f)

    I feel like I'm failing at the random tests that use the != operator. So I'm wondering if my assumption above is correct.

  • Custom User Avatar

    Amazing! 👏🏻👏🏻👏🏻

  • Custom User Avatar

    Looks like in addition to 'Best Practice' and 'Clever' solutions I strongly would like to have the button 'OMG' or 'LOL' :). Anyway, appreciate the persistance of the author!

  • Custom User Avatar

    Great kata, had a lot of fun solving it but I would propose to choose a few operators you will be using and pointing them out in the description because in the end we are basically doing the same thing for every operator which is not as fun.

  • Custom User Avatar

    It's a CW bug or something, I just reported it. Did you click Fork? It's crazy x)

  • Loading more items...