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.
+1 Efficiency, only concern is if str2 is empty string then it reports canScramble true, but that's just me being difficult :P
Assuming English, 'y' can be regarded as a vowel in certain cases. If there are no other regular vowels 'aeiou' the 'y' acts as a vowel (so it should be moved to the end in theory according to the description). Some examples:
'myth' -> 'mthy'
'slyly' -> 'sllyy'
It might be good enough to check if there are other regular vowels present and if not, move the ys to the end. You would need to verify that the string input is actually a word though and not a garbled string and that might make this way more complicated.