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'm nitpicking, but starting for loop from 2 would be give the same output.
There is no need to use the boolean, just
return false
andreturn true
;-)You might have been a victim of the (dubious) "only return once" principle.
+1 Efficiency, only concern is if str2 is empty string then it reports canScramble true, but that's just me being difficult :P