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.
The expected complexity should be O(str1.length + str2.length). Your solution is O(N^2) because searching is O(N)
With your code in repl.it I get the wrong result. The test string is this:
71899703 200 6 91 425 4 67407 7 96488 6 4 2 7 31064 9 7920 1 34608557 27 72 18 81
. You need to fix your sort function.