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.
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".