Anagrams · Compiler
Anagrams
Decide whether rearranging all the letters of the first word can produce the second word. Every occurrence of every letter counts.
- Input
- Two space-separated words on one line. Each contains 1 to 100 lowercase ASCII letters.
- Output
- Print YES if the words are anagrams, otherwise print NO.
Compiler Explorer runs your code when you run or check it.
Loading your exercise draft…