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 comment is hidden because it contains spoiler information about the solution
Rejected for using outdated language version.
Forking is still possible, so no work is necessarily lost.
Will not handle unicode characters such as ö/Ö, Ş/ş etc.
Maybe he just mean, function wont return nil in case of empty string?
wave = []string{} ??? best practice?
allocations will still happen!
if you want to avoid this, set the capacity
wave = make([]string, 0 , len(words))
Not sure how this never got looked at.
The language version is now invalid, if you update it, ill approve.
I kneel.
Runes in Go loosely equate to the "charcode as an int", and are represented by single-quotes.
It's definitely a bit 'black magic', but it says:
Take the charcode stored in c, take off the charcode of "a" (97) and add the charcode of "A" (65). Then, convert the result back to a string.
So, for example, the letter "r" has ascii value 114. 114 - 97 + 65 = 82, which is the charcode of R.
can someone explain what exactly this does and how?
string(c-'a'+'A')
This comment is hidden because it contains spoiler information about the solution
Good to know, thanks!
I had just copied the python one, which I've also fixed now.
Language-specific code blocks use lowercase language names.
fixed
The Haskell sample tests have the solution-method in them. Probably shouldn't!
Haskell translation
Loading more items...