Challenge
Given two strings, work out if they both have exactly the same characters in them.
Example
Input
word, wrdo
This returns true because they are the same but just scrambled.
Input
word, wwro
This returns false.
Input
boat, toba
This returns true
Rules
Here are the rules!
- Assume input will be at least 1 char long, and no longer than 8 chars.
- No special characters, only A-Z
- All inputs can be assumed to be lowercase
Test Cases
boat, boat = true
toab, boat = true
oabt, toab = true
a, aa = false
zzz, zzzzzzzz = false
zyyyzzzz, yyzzzzzy = true
sleepy, pyels = false
p,p = true
Good luck!
The shorter an answer is, the better!
Edit
Shame this question is marked community wiki... I thought that was the purpose of the site?!?!
