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.
The specification says that where there are multiple valid paths return any of them. Nothing is mentioned about preferring straight lines over diagonals.
After completing this, I get the following:
Test Failed
String lengths are both 11. Strings differ at index 4.
Expected: ".S.\n.P.\n.G."
But was: ".S.\nP..\n.G."
When formatting, this amounts to the following:
Instead of
.S.
.P.
.G.
My code returns
.S.
P..
.G.
Which afaict should be valid?
:O everything is about maintainability! :P
Absolutely, I see the bug now. Thank you for pointing this out. However, the instruction containing 0.55 when code only accepts ints is misleading.
26 letters in English alphabet. Why not return early if the letter is not present?
Ah, I missed that you missed W.
This comment is hidden because it contains spoiler information about the solution
Missed multiple opportunities to return early. The OK variable doesn't need to exist.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Also, your list of characters to split on is not that scalable. That'd be best in a collection of some kind.
This comment is hidden because it contains spoiler information about the solution