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.
its not good to use nested ternary operator, to hard to understand what going on
In your code, at each iteration, if a character is found in a str1, a new string is created. It turns out that in the worst case you will get str1.length rows in memory
This code leaves punctuation intact except for spaces. If the number of spaces is important, then care should have been taken to create suitable tests.
Yep, in the tree that is described even in the example, this solution returns the incorrect value "15" instead of "-51".
Awesome Solution!
I had a similar solution. To make this a little easier on the eyes I would recommend using parenthesis.
It's awful.
i really like the first function
one liners doesn't mean clean code
Unreadable
Nesting ternary operators is not a good practice.