All Problems
mediumStrings

Anagram Check

Problem Statement
Check if two strings are anagrams of each other. Print "Yes" or "No".

SAMPLE INPUT

listen
silent

SAMPLE OUTPUT

Yes

CONSTRAINTS

  • 1 <= len(s) <= 1000
  • Lowercase letters only

Explanation: Two strings are anagrams if they contain the same characters with the same frequencies.

Code Editor
Output
Click "Run" to see output...