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.
Damn, I rushed this code, but good job using switch cases !!!
I just don't capted that the exit is so limited that it could be just formated manualy like that lol!
noice, with switch case less code and cleaner
Clean
Slightly better readability perhaps.
Wow !
I was totally lost (I didn't understood the String... type)
Don’t follow principles and rules blindly, understand how to apply them.
When does this principle apply:
Multiple entries: Always, it is only possible in assembler and strongly discouraged from.
Multiple exits: Recursion and long functions, improve readability and avoids unforeseen behaviour.\
Neither of them apply here.
Wow, that is a lot simpler and shorter than my code lol.
I literally had to use a while loop (Im a beginner btw)
Cool!
very nice
This comment is hidden because it contains spoiler information about the solution
I am sorry to hear about your whole head.
Your code is broken because it tries to get a token that is not there.
The fault lies in this code when names >= 4
You can see that if there is an ODD number of names (>= 4) then that last str2 assignment will fail when it runs out of tokens. E.g. if there are 5 names then:
e.g. try this:
Amazing! better than if/else
Idk
;) And I prefer Strng Builder over the others whenever I need to change the string often. A single concatenation or two using string might not much difference either.
Null check is not needed as we already check using switch whether the length of the array is 0.
Loading more items...