Anagram Check
Are the two strings anagrams — do they contain exactly the same multiset of characters?
Input: two lines, each with a lowercase string.
Output: YES or NO.
Constraints:
- 1 ≤ |A|, |B| ≤ 104
Sample Tests
Input 1
listen silent
Output 1
YES
Input 2
aab abb
Output 2
NO
Discussion (opens after you solve — no spoilers before)
No comments yet.