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.
Well this made me solve it in 2.5 seconds :p
:whistling:
:whistling:
;)
The answer to this question is crucial to solving this kata. It's not apparent from the description, but after reading this comment, I realise I have waisted some time with a way too complex back-tracking strategy.
I've just done it (before seeing your message), using standard markdown link format.
its called a freebie and its spelled fun.enjoy:)
And ~7 kyu in Ruby.
@Hana1989, Thank you for the suggestion, but I think I will keep it the way it is for now.
plz, don't wake up FArekkusu... ;o
You're Welcome!
Thank you for taking your time! I will clarify this last rule in a technical note.
Edit: this rule regarding unary operators is there just because it made sense to me at the moment. As I understand it (and I may be wrong here), there is no consensus on how to manage these precedences when you generalize this much and people tend to use parentheses in order not to be ambiguous. Also, this kata is hard enough as is (wait for the further generalized version that I'm preparing).
Okay, I get the problem here. You are grouping by the operator with the highest precedence using different rules to the ones I define in the description.
Prefixes and postfixes can only be grouped when they are at the very beginning or the very end of an expression (see my examples with [a], [b], [c] and [d]).
In this case, the correct grouping would be:
3¨((9,,,)¨(!8))
.If you see my answer to ZED's question, you will see the following:
In your grouping, you are asuming they are right-associative (please, use my definition for this concept).
The correct grouping would be
323 [[ (5 ]]] [[ 597)
, and I'm guessing that's the problem here.I think that's the case @iaeliyen. The
:
operator is the one that has the highest precedence (23), and that means that it will be "chosen" first using the definition that I gave in my kata.Your approach is exactly the same as mine, but I solve recursively in the opposite order, so dont't worry about that.
by reading this:
It seems that you're facing same problem due to non-conventional use of defintion, please see the question I've asked in the same discourse.
Hello! I've run your example to see what the exact order of operations would be:
:
operator =>(10´´´*´(8)##115):
*
,##
. We choose the second because it has a higher precedence =>((10´´´*´(8))##115):
(((10´´´)*(´(8)))##115):
If I'm not mistaken, the way you order the infix operators would be the problem. I suggest you use a translation of the approach I used here.
I hope this is clear enough.
Cheers :)
Loading more items...