fb pixel

Shuffle the letters

Given two words, we would like to know if one can be produced as a result of shuffling the letters of the second one.
The input contains two space-separated words.
The program should print Yes if it’s possible to obtain the first word by shuffling the letters of the second one and No otherwise.
Input
Output
hello elloh
Yes
something some
No
To check your solution you need to sign in
Sign in to continue