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.
crazy clever!
there is no need for a ternary operator since return already returns a boolean value (true or false)
For this case it won't make a difference since we do not have any block within the function.
I do not agree with you. In english, space char is the word's separator. An anagram is a WORD that can be mixed to create another. So, in 'E h llo' there are 3 differents words.
If you consider 'E h llo' as string, and not as a word, spaces are part of this string.
To me, if this issue is not specified in the instructions, your exemple should return false by default.
Just an opinion
my solution is one line.
DRY
no need of ternary operator, just compare t&o it'll return a Boolean
True, they are useless here. Just return the result of the comparison.
But you defined new variables yourself
Oh my lord, I feel silly for counting the letters in both strings now.
I learned algebra with yoru solution
This idea is similar to what I did, but you do not need the ternary operator for the return. If the strings are equal, then it will automatically return true, false otherwise.
Also, defining new variables is unecessary. Just return the comparison.
Any one here can explain me I didnot understand this! I am not good in Math
Mind elaborate?
I added in my solution checking the length equality of the words to save time if we have "cat" and "hipopotam".
Loading more items...