Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
is there a reason to not leaving a space? like why cramp them together instead of
return position + roll /* 2
only leave should_work_for_random_tests fail, why?
Nothing unresolved remaining.
Seeing that you've eventually solved this without segfaults, do you wish to resolve the outstanding issue or is there something still unresolved?
This comment is hidden because it contains spoiler information about the solution
.
I had simular issue. You should check if you processing correctrly cases where more then two chained operators. Like a < b < c < d.
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.
I thought my solution is the ugliest...
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?
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.
Amazing! 👏🏻👏🏻👏🏻
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!
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.
It's a CW bug or something, I just reported it. Did you click Fork? It's crazy x)
Loading more items...