Case-Insensitive Anagram Check
Problem statement
Given two strings wordA and wordB, return true when they are anagrams of each other and false otherwise.
The comparison is case-insensitive. Anagrams must contain the same letters with the same multiplicities, but the letters may appear in any order.
Function
isAnagram(wordA: String, wordB: String) → booleanExamples
Example 1
wordA = "Drier"wordB = "Rider"return = trueAfter ignoring case, both words contain one d, one e, one i, and two r letters.
Example 2
wordA = "hello"wordB = "world"return = falseThe two words have different letter counts, so they are not anagrams.
Constraints
wordAandwordBare defined and may be empty.- Each string contains only uppercase and lowercase English letters.
0 ≤ wordA.length, wordB.length ≤ 30.