Valid Anagram π’
Given two strings s
and t
, this function checks if t
is an anagram of s
, and returns true
if it is, and false
otherwise.
An anagram is a word or phrase formed by rearranging the letters of a different word or phrase, using all the original letters exactly once.
π Example Usage
π’ Example 1
π΄ Example 2
π Constraints
1 <= s.length, t.length <= 5 * 10^4
s
andt
consist of lowercase English letters.
Last updated