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.
You can also check out my fork with added comments : https://www.codewars.com/kumite/61443ee026b2c50033a0499a?sel=61b1dce4b2b845002806a738
spoiler
This comment is hidden because it contains spoiler information about the solution
Fun kata, and really not as difficult as it sounds.
I can confirm there is no ambiguity with the description, and no problems with any of the test tracks.
How are you counting 157 and 298? You can verify the 147 and 288 just by counting the characters manually. Yes the corner and cross count.
Remember that the distance given is always the number of clockwise steps to the train engine (upper case), even if the train itself moves anti-clockwise.
I thought this was too easy for a 2ku.. until my solution timed out.
This seems clear enough. It works the way things would work in real life.
This comment is hidden because it contains spoiler information about the solution
Then if you had a very short message such as "A"(.-) or "I"(..) how can it be possible to discriminate between these two messages, when a . and - can be almost exactly the same length??
Thanks for the explanation in comments. I had trouble understanding the other solutions on here.
Oops, forgot to free(map)
not directly. You can use the fork panels, but you have to build some code on your side to actually be able to compare the different solutions on the same inputs. Usual (proper) way:
it
block where you test all input on that function onlyit
block in the output panelthat's rather cumbersome, and there are a lot of things to considere to be sure what you do is correct to estimate/compare the performances, but here is the general idea.
Does codewars give us some way to compare execution times?
.
I did. After a few clicks it passed enough test to submit.
Loading more items...