There's a cool technique I read about to solve problems like this. I'll put it a few lines down in case you want to think about it yourself.
.
Sort them, then check for equality! I learned this when reading about anagrams.
Not sure I understand.
-----