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.
No, your proposed output goes against the specification.
"5+(6-2)*9+3^(7-1)"
=>"562-9*+371-^+"
should also accept"562-9*371-^++"
no?oh... its the fault of my inattention. Thank you very much
The operator
^
is right-associative:why? when we convert infix to postfix form we save the sequence of operations, so infix 1^2^3 we convert to postfix 12^3^. This postfix form is correct, because when we convert it back to infix we have the initial sequence of operations: (1^2)^3. But postfix form in this kata turns into 1^(2^3), and whe lose the initial sequence of operations. Yes, the answer will be the same in both cases, but its illogical when from our postfix form we get infix form that is different from initial one
You're wrong.
i think postfix form of 1^2^3 is 12^3^ and it seems to be an issue in this kata
Ah, didn't need a reminder how much I was annoyed by this problem lol.
In JS STDERR
Max Buffer Size Reached (1.5 MiB) is called with each random test.
Can somebody help me please,??
Not sure if the kata is worried about this, but I was able to pass the full test suite without catering for x^y^z. It approved code that returned an answer of xy^z^. However, I wrote the code to produce xyz^^ before submitting...
Lua translation open for review, feedback would be appreciated !
I found an error in my code. The resulting string contains an "end of line" character in the middle. It seems that how the result is printed is different from what is printed using the cout function.
Now the output is following:
To see where is your mistake, change your code to:
This translation has been rejected because it had no random tests, the reference solution was incorrect, and the author has not reacted several months after it has been pointed out.
Loading more items...