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.
whenever you index a string it returns the char, and a char can't be concatonated to another char, but it can be concatonated to a string so the second index doesn't need to be converted to a string.
Meanwhile when i used a List it timed out for me ;(
Why result is list and then convert to an array ?
initialize result an array with str.length/2 and avoid converting to array at the end
This comment is hidden because it contains spoiler information about the solution