Valid Anagram

Easy

Given two strings s and t, return true if t is an anagram of s, and false otherwise.

Example 1

isAnagram()
Input
s = "anagram", t = "nagaram"
Output
true

Example 2

isAnagram()
Input
s = "rat", t = "car"
Output
false
Constraints
0 <= s.length, t.length <= 5 * 10^4
s and t consist of lowercase English letters.

Topics

StringsHash Table

Implement isAnagram in the editor and return the answer — printing it is never graded.