Valid Anagram

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

Constraints

  • 1 <= s.length, t.length <= 5 * 10^4
  • s and t consist of lowercase English letters.
Saving… · 2 lines
class Solution:
def validAnagram(self, s: str, t: str) -> bool:
Console

Click Run to execute sample tests.