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.
This is out of the specs of the kata, closing
Not going to change difficulty.
https://tour.golang.org/moretypes/7 Strings are also slices (of runes)
if "high" is omitted then it points to the end of "a"
For example:
Please explain the last line. I new to the language and don't really understand what does : do.
That's ezxactly my point: it mentions characters, which for Go in general means just about anything in the Unicode tables, of which Latin1 is a tiny part, and ASCII, which is what is actually being tested, and even tinier one. Hence the suggestion to either modify the wording to make it clear the kata is only about single-byte characters sets, or include tests with multiple-byte per character, which will make all SBCS-only solutions break.
The description never mentions Latin1.
This comment is hidden because it contains spoiler information about the solution
Fixed.
You were right. I'm very sorry for the disturbance:-(
True for the tests and true for your solution.
Since you have passed the kata it is time to look at the tests and to see if they are somewhere wrong:-)
I passed it too, but remember because something works does not mean it is correct. The exact same code failed expecting that [""] result (and getting [] instead) then succeeded on a second run, while nothing in the kata suggests [""] can be a valid output in any case.
168 guys passed the Go kata (from your profile I supposed you passed with Golang) so I am quite sure there are no errors in the tests. I can't say more if you can't give the input...
There appears a bug in the random tests: on one submission, it expected [""] instead of [], which does not match the kata specification. Resubmitting the same code did not trigger the error, probably because the same original source was not generated.
I didn't print the input and it didn't happen the next time I submitted, so I can't see what the default value causing this is.
Ah, I think I understand: added those.
Comments in the sample tests as in existing langauges:
// return n-1 ?
etc.Loading more items...