Valid Anagram
Easy
Strings
String
Hash Table
Sorting
Given two strings s and t, return true if t is an anagram of s.
Constraints
1 ≤ s.length ≤ 5×10^4
Examples
Example 1:
Input: anagram
nagaram
Output: true
Example 2:
Input: rat
car
Output: false
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console