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
same answer, i feel like iam finally learning to write more efficient, altough i still need to learn to write efficients codes wich is way more important than 1 liners, but is a start
why did the set still accepts the duplicate letters? i thought sets removes duplicates
midudev talked that switch isn´t not better than the Objects.
If the case evaluates true, then it executes the statement after the colon and before the break. So if the first case is not true, it checks the following cases.
How will it convert all the strings letters to its complimentary letter if it [break] at the first letter it finds to replace? If im not mistaken, doesn't the [break] keyword exit the iteration out of the switch statment and if so how will we find the complimentary letters for the other letters of the input string?
My solution is almost the same. this is a oneliner it is cool
This comment is hidden because it contains spoiler information about the solution
It's impossible to read only for beginners, but solutions like that one are great because you can learn some new language features by reading them.
why bro? why do you produce such an imposible-to-read piece of code -.-
Because some people (icluding me) didn't knew about .replace.
It's not bad practice. It's just different approach taking into consideration the performance of the solution.
try to figure it out why paj :D
This comment is hidden because it contains spoiler information about the solution
Are you sure? How so? I tested it, and I get 1 returned, which is the number of characters that occur more than once.
Loading more items...