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
aaab, bbba = false
\$\endgroup\$