Valid Anagram
EasyArrays & Strings
Determine if string t is an anagram of string s (contains the same characters in the same quantities).
Example:
Input: s = "anagram", t = "nagaram"
Output: true
Input: s = "rat", t = "car"
Output: false
Constraints:
- •
1 <= s.length, t.length <= 5 * 10^4 - •
s and t consist of lowercase English letters
Valid Anagram
EasyArrays & Strings
Determine if string t is an anagram of string s (contains the same characters in the same quantities).
Example:
Input: s = "anagram", t = "nagaram"
Output: true
Input: s = "rat", t = "car"
Output: false
Constraints:
- •
1 <= s.length, t.length <= 5 * 10^4 - •
s and t consist of lowercase English letters
Press Run or Ctrl+Enter to execute