227. Anagram Detector
Easy · String
Two words are anagrams if they use exactly the same letters (just rearranged). Write a function that returns true if word1 and word2 are anagrams (case-insensitive).
Examples
Example 1 Input: "listen", "silent" Output: true
Example 2 Input: "hello", "world" Output: false
Constraints
- 1 ≤ word.length ≤ 50, letters only