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.
Done in latest fork
Approved
python new test framework is required. updated in this fork
Of course ! Pong basis ;)
And it's an excellent habit !
Not a very clean method ;) It's better to test is the indexes are valid.
So... After solving it, I must say the description is absolutely inconsistent. You need to stop parsing when the diagonal stops but there remains a row you did not parse, or when your reach on the right the length of the shortest row.
Description needs to add more explanations and examples to clarify when we are supposed to stop parsing the input string. For example in the second example of basic tests, it returns "BruuJ", "nothing on the bottom line, so parsing should end". However one could easily extend the result by continuing upright with "D", "H", etc., that is following the description ("The message ends when there is no space at the right up or down diagonal."). The same case could occur on the second diagonal if one line is shorter than others, so what are we supposed to do?
I agree with you, the description does not describe correctly what users are supposed to do.
Unfortunately, the problem statement only says that "[the] message ends when there is no space at the right up or down diagonal." Probably more examples, especially those clarifying possible edge cases, would help.
It's expecting string 'BruuJ', because in the matrix there is another row with letter 'K' in it. In order to continue decoding, it should go to the last row, but there's no letter at that index, so decoding must stop.
This comment is hidden because it contains spoiler information about the solution
Hi everybody,
I have a question regarding the random tests.
Here's a random test string:
B p E D y o q F q n C H v x K K D
C r I y o w A n y F t B B q J C u B t z I A F I
F H u s s y H I D n B
L o J u F D F J A I s G s u o x E v
L r x G J K y x o I E n w G H J M M z w F M r G
K
Here's the message I got:
Expected: 'BruuJ', instead got: 'BruuJDHnqFBGwuHxMvz'
I don't understand why 'BruuJDHnqFBGwuHxMvz' is incorrect, because as far as I can see you can easily bounce up and down from the first letter B to the last letter z. Maybe the author of the problem could clarify the problem statement.
Cheers.
P.S. I'm going to post my JavaScript code hidden under Spoiler in case someone would care to look into it. (Done!)
This comment is hidden because it contains spoiler information about the solution
thanks for taking your time!!!!!! means a lot yea ill try:)))
Loading more items...