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.
I fail to see how is that relevant in their solution, but you also used it in your own solution.
Not only the local StringBuilder instance doesn't leave the scope of the method, they don't even create threads in their solution to worry about this.
However, concatenation operation AFAIK creates StringBuilder instances each time they are called on two String instances, and return
StringBuilder.toString()
.It's not thread safe