191. Valid Anagram

EasyHash Table

Given two strings s and t, return true if t is an anagram of s, and false otherwise. An anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.

Examples

Input: anagram nagaram

Output: true

Explanation: Both strings contain a:3, n:1, g:1, r:1, m:1.

Constraints

  • 1 <= s.length, t.length <= 5 * 10^4
  • s and t consist of lowercase English letters.
Loading...

Run checks all cases above. Submit evaluates all test cases.