93. Are They Anagrams?

Acceptance — 0 accepted 0 submissions

Easy
HashingSortingStrings
No companies listed
'listen' and 'silent' use exactly the same letters, just rearranged. Such words are anagrams.

Given two words, check whether they are anagrams of each other.

Input Format
The first line has word s.
The second line has word t.
Both are lowercase.

Output Format
Print Yes if they are anagrams, otherwise No.

Constraints
• 1 ≤ length of s, t ≤ 10^5

Example 1

Input
listen
silent
Output
Yes

Explanation Same letters, different order.

Example 2

Input
rat
car
Output
No

Explanation rat has t but car has c.

Example 3

Input
aab
abb
Output
No

Explanation Same letters, but different counts.

Acceptance —
Accepted 0
Submissions 0
Auto-save
Saved Ln 1, Col 1
Submit a solution to see its status here.
Input
Expected Output
Yes
No results yet
Run your code to test it against the sample cases.
Problem List