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.
Uff, the code is really short but recursion doesn't convince me.
It doesn't compile.
Only one detail: use StringBuilder to concatenate. It's much faster.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
What do you mean by "std::stack op" ? It doesn't compile for me
C++ still needs to be fixed
This solution is not entirely correct. It isn't considering the associativity of operations at all. And it should, because it is explicitly stated in the instructions of the problem that '^' is right-associative while the rest of operations are left-associative. The importance of this distinction can be seen in one of the examples provided, also in the instructions. "1^2^3" should return "123^^", while "1+2+3" should return "12+3+". This solution is not treating adequately the former (returns "12^3^").
It appears there isn't any testcases with two consecutives ^. This should be fixed.
This solution is not entirely correct. It isn't considering the associativity of operations at all. And it should, because it is explicitly stated in the instructions of the problem that '^' is right-associative while the rest of operations are left-associative. The importance of this distinction can be seen in one of the examples provided, also in the instructions. "1^2^3" should return "123^^", while "1+2+3" should return "12+3+". This solution is not treating adequately the former (returns "12^3^").
It appears there isn't any testcases with two consecutives ^. This should be fixed.
Much more tests are necessary !! Lots of wrong solutions are being accepted !!
The complexity is terrible. Sorry, even if it is a clear solution, is really bad practice.