EasyString· 66% acceptance
#499

Valid Anagram 4

Easy

Return `true` if `t` is an anagram of `s`. Variant **#4**.

Example 1

Input: s = "abcd", t = "abcd"

Output: true

Constraints

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

Acceptance: 66% · Topics: string, hash-table, sorting

isAnagram

← All practice problems