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.
nice work !
This comment is hidden because it contains spoiler information about the solution
C version of this kata seems broken. getting no feedback from the tests.
A Beautiful Kata. Many possible ways of solving.
i was very surprised how few C solutions actually used #include <regex.h>
given that it is tagged as a regex kata.
Yeah, thanks for mentioning it. It is just a convention though, as far as i know.
As far as i know, it is not something mathematical. So i just like to have it explicit,
because it is just a convention, right?
This comment is hidden because it contains spoiler information about the solution
nice solution. did not understand all of it, but it is shorter than mine. But you do not have to 0-initialize an array. it is so automatically.
for anyone who is parsing the program and then executing:
it basically expects to detect invalid instructions at runtime.
you can solve this by adding a bogus instruction when the parser detects an invalid instruction.
this bogus instruction then can be detected at runtime, throwing a RuntimeException as it is about to execute.
This importance of this is that the Testcases excpect the output up until the invalid instruction is encountered.
love the kata.
There is so much in there to learn.
Grammar transformations, applying Visitor pattern, ...
There are some ambiguities such as order of evaluation, e.g. "4 / 2 * 3" is 6.0 according to the kata, but could be 2/3 also,
but these can be resolved through debug statements.
your solution would fail if
i==0 and a[i]==0
your solution would fail if
i==0 and a[i]==0
your solution would fail if
i==0 and a[i]==0
your solution would fail if
i==0 and a[i]==0
your solution would fail if
i==0 and a[i]==0
but you are starting your IntStream from 1
Loading more items...